openair3: Removed EPC software that has been transfered to Eurecom gitlab
git-svn-id: http://svn.eurecom.fr/openair4G/trunk@7884 818b1a75-f10b-46b9-bf7c-635c3b92a50f
This commit is contained in:
@@ -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>.
|
|
||||||
@@ -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>.
|
|
||||||
@@ -1,217 +0,0 @@
|
|||||||
# Doxyfile 1.3.8
|
|
||||||
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
# Project related configuration options
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
PROJECT_NAME = OPENAIR
|
|
||||||
PROJECT_NUMBER =
|
|
||||||
OUTPUT_DIRECTORY =
|
|
||||||
CREATE_SUBDIRS = NO
|
|
||||||
OUTPUT_LANGUAGE = English
|
|
||||||
USE_WINDOWS_ENCODING = YES
|
|
||||||
BRIEF_MEMBER_DESC = YES
|
|
||||||
REPEAT_BRIEF = YES
|
|
||||||
ABBREVIATE_BRIEF =
|
|
||||||
ALWAYS_DETAILED_SEC = NO
|
|
||||||
INLINE_INHERITED_MEMB = NO
|
|
||||||
FULL_PATH_NAMES = NO
|
|
||||||
STRIP_FROM_PATH =
|
|
||||||
STRIP_FROM_INC_PATH =
|
|
||||||
SHORT_NAMES = NO
|
|
||||||
JAVADOC_AUTOBRIEF = YES
|
|
||||||
MULTILINE_CPP_IS_BRIEF = YES
|
|
||||||
DETAILS_AT_TOP = YES
|
|
||||||
INHERIT_DOCS = NO
|
|
||||||
DISTRIBUTE_GROUP_DOC = NO
|
|
||||||
TAB_SIZE = 8
|
|
||||||
ALIASES =
|
|
||||||
OPTIMIZE_OUTPUT_FOR_C = YES
|
|
||||||
OPTIMIZE_OUTPUT_JAVA = NO
|
|
||||||
SUBGROUPING = YES
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
# Build related configuration options
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
EXTRACT_ALL = YES
|
|
||||||
EXTRACT_PRIVATE = NO
|
|
||||||
EXTRACT_STATIC = NO
|
|
||||||
EXTRACT_LOCAL_CLASSES = YES
|
|
||||||
EXTRACT_LOCAL_METHODS = YES
|
|
||||||
HIDE_UNDOC_MEMBERS = YES
|
|
||||||
HIDE_UNDOC_CLASSES = YES
|
|
||||||
HIDE_FRIEND_COMPOUNDS = NO
|
|
||||||
HIDE_IN_BODY_DOCS = NO
|
|
||||||
INTERNAL_DOCS = NO
|
|
||||||
CASE_SENSE_NAMES = YES
|
|
||||||
HIDE_SCOPE_NAMES = NO
|
|
||||||
SHOW_INCLUDE_FILES = NO
|
|
||||||
INLINE_INFO = YES
|
|
||||||
SORT_MEMBER_DOCS = NO
|
|
||||||
SORT_BRIEF_DOCS = NO
|
|
||||||
SORT_BY_SCOPE_NAME = NO
|
|
||||||
GENERATE_TODOLIST = YES
|
|
||||||
GENERATE_TESTLIST = NO
|
|
||||||
GENERATE_BUGLIST = YES
|
|
||||||
GENERATE_DEPRECATEDLIST= NO
|
|
||||||
ENABLED_SECTIONS =
|
|
||||||
MAX_INITIALIZER_LINES = 30
|
|
||||||
SHOW_USED_FILES = NO
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
# configuration options related to warning and progress messages
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
QUIET = NO
|
|
||||||
WARNINGS = YES
|
|
||||||
WARN_IF_UNDOCUMENTED = YES
|
|
||||||
WARN_IF_DOC_ERROR = YES
|
|
||||||
WARN_FORMAT = "$file:$line: $text"
|
|
||||||
WARN_LOGFILE =
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
# configuration options related to the input files
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
INPUT = $(OPENAIR3_DIR)/MESH/L3_rrc_interface.h \
|
|
||||||
$(OPENAIR3_DIR)/MESH/L3_rrc_defs.h \
|
|
||||||
$(OPENAIR3_DIR)/MESH/cmm_rrm_interface.h \
|
|
||||||
$(OPENAIR3_DIR)/MESH/cmm_ral_interface.h \
|
|
||||||
|
|
||||||
FILE_PATTERNS = *.h
|
|
||||||
RECURSIVE = NO
|
|
||||||
EXCLUDE =
|
|
||||||
EXCLUDE_SYMLINKS = NO
|
|
||||||
EXCLUDE_PATTERNS =
|
|
||||||
EXAMPLE_PATH =
|
|
||||||
EXAMPLE_PATTERNS =
|
|
||||||
EXAMPLE_RECURSIVE = NO
|
|
||||||
IMAGE_PATH = images
|
|
||||||
INPUT_FILTER =
|
|
||||||
FILTER_PATTERNS =
|
|
||||||
FILTER_SOURCE_FILES = NO
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
# configuration options related to source browsing
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
SOURCE_BROWSER = NO
|
|
||||||
INLINE_SOURCES = NO
|
|
||||||
STRIP_CODE_COMMENTS = YES
|
|
||||||
REFERENCED_BY_RELATION = NO
|
|
||||||
REFERENCES_RELATION = NO
|
|
||||||
VERBATIM_HEADERS = YES
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
# configuration options related to the alphabetical class index
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
ALPHABETICAL_INDEX = NO
|
|
||||||
COLS_IN_ALPHA_INDEX = 5
|
|
||||||
IGNORE_PREFIX =
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
COLS_IN_ALPHA_INDEX = 5
|
|
||||||
IGNORE_PREFIX =
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
# configuration options related to the alphabetical class index
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
ALPHABETICAL_INDEX = NO
|
|
||||||
COLS_IN_ALPHA_INDEX = 5
|
|
||||||
IGNORE_PREFIX =
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
# configuration options related to the HTML output
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
GENERATE_HTML = YES
|
|
||||||
HTML_OUTPUT = html
|
|
||||||
HTML_FILE_EXTENSION = .html
|
|
||||||
HTML_HEADER =
|
|
||||||
HTML_FOOTER =
|
|
||||||
HTML_STYLESHEET =
|
|
||||||
HTML_ALIGN_MEMBERS = YES
|
|
||||||
GENERATE_HTMLHELP = YES
|
|
||||||
CHM_FILE = irs_openair.chm
|
|
||||||
HHC_LOCATION =
|
|
||||||
GENERATE_CHI = NO
|
|
||||||
BINARY_TOC = NO
|
|
||||||
TOC_EXPAND = NO
|
|
||||||
DISABLE_INDEX = NO
|
|
||||||
ENUM_VALUES_PER_LINE = 4
|
|
||||||
GENERATE_TREEVIEW = YES
|
|
||||||
TREEVIEW_WIDTH = 250
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
# configuration options related to the LaTeX output
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
GENERATE_LATEX = NO
|
|
||||||
LATEX_OUTPUT = latex
|
|
||||||
LATEX_CMD_NAME = latex
|
|
||||||
MAKEINDEX_CMD_NAME = makeindex
|
|
||||||
COMPACT_LATEX = NO
|
|
||||||
PAPER_TYPE = a4wide
|
|
||||||
EXTRA_PACKAGES = amsmath amssymb
|
|
||||||
LATEX_HEADER =
|
|
||||||
PDF_HYPERLINKS = YES
|
|
||||||
USE_PDFLATEX = YES
|
|
||||||
LATEX_BATCHMODE = NO
|
|
||||||
LATEX_HIDE_INDICES = NO
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
# configuration options related to the RTF output
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
GENERATE_RTF = NO
|
|
||||||
RTF_OUTPUT = rtf
|
|
||||||
COMPACT_RTF = YES
|
|
||||||
RTF_HYPERLINKS = YES
|
|
||||||
RTF_STYLESHEET_FILE =
|
|
||||||
RTF_EXTENSIONS_FILE =
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
# configuration options related to the man page output
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
GENERATE_MAN = NO
|
|
||||||
MAN_OUTPUT = man
|
|
||||||
MAN_EXTENSION = .3
|
|
||||||
MAN_LINKS = NO
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
# configuration options related to the XML output
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
GENERATE_XML = NO
|
|
||||||
XML_OUTPUT = xml
|
|
||||||
XML_SCHEMA =
|
|
||||||
XML_DTD =
|
|
||||||
XML_PROGRAMLISTING = YES
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
# configuration options for the AutoGen Definitions output
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
GENERATE_AUTOGEN_DEF = NO
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
# configuration options related to the Perl module output
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
GENERATE_PERLMOD = NO
|
|
||||||
PERLMOD_LATEX = NO
|
|
||||||
PERLMOD_PRETTY = YES
|
|
||||||
PERLMOD_MAKEVAR_PREFIX =
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
# Configuration options related to the preprocessor
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
ENABLE_PREPROCESSING = YES
|
|
||||||
MACRO_EXPANSION = NO
|
|
||||||
EXPAND_ONLY_PREDEF = NO
|
|
||||||
SEARCH_INCLUDES = YES
|
|
||||||
INCLUDE_PATH =
|
|
||||||
INCLUDE_FILE_PATTERNS =
|
|
||||||
PREDEFINED =
|
|
||||||
EXPAND_AS_DEFINED =
|
|
||||||
SKIP_FUNCTION_MACROS = YES
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
# Configuration::additions related to external references
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
TAGFILES =
|
|
||||||
GENERATE_TAGFILE =
|
|
||||||
ALLEXTERNALS = NO
|
|
||||||
EXTERNAL_GROUPS = YES
|
|
||||||
PERL_PATH = /usr/bin/perl
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
# Configuration options related to the dot tool
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
CLASS_DIAGRAMS = NO
|
|
||||||
HIDE_UNDOC_RELATIONS = NO
|
|
||||||
HAVE_DOT = NO
|
|
||||||
CLASS_GRAPH = NO
|
|
||||||
COLLABORATION_GRAPH = NO
|
|
||||||
UML_LOOK = NO
|
|
||||||
TEMPLATE_RELATIONS = NO
|
|
||||||
INCLUDE_GRAPH = NO
|
|
||||||
INCLUDED_BY_GRAPH = NO
|
|
||||||
CALL_GRAPH = NO
|
|
||||||
GRAPHICAL_HIERARCHY = NO
|
|
||||||
DOT_IMAGE_FORMAT = jpg
|
|
||||||
DOT_PATH =
|
|
||||||
DOTFILE_DIRS = ../docs/dotfiles
|
|
||||||
@@ -1,340 +0,0 @@
|
|||||||
GNU GENERAL PUBLIC LICENSE
|
|
||||||
Version 2, June 1991
|
|
||||||
|
|
||||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
|
|
||||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
||||||
Everyone is permitted to copy and distribute verbatim copies
|
|
||||||
of this license document, but changing it is not allowed.
|
|
||||||
|
|
||||||
Preamble
|
|
||||||
|
|
||||||
The licenses for most software are designed to take away your
|
|
||||||
freedom to share and change it. By contrast, the GNU General Public
|
|
||||||
License is intended to guarantee your freedom to share and change free
|
|
||||||
software--to make sure the software is free for all its users. This
|
|
||||||
General Public License applies to most of the Free Software
|
|
||||||
Foundation's software and to any other program whose authors commit to
|
|
||||||
using it. (Some other Free Software Foundation software is covered by
|
|
||||||
the GNU Library General Public License instead.) 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
|
|
||||||
this service 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 make restrictions that forbid
|
|
||||||
anyone to deny you these rights or to ask you to surrender the rights.
|
|
||||||
These restrictions translate to certain responsibilities for you if you
|
|
||||||
distribute copies of the software, or if you modify it.
|
|
||||||
|
|
||||||
For example, if you distribute copies of such a program, whether
|
|
||||||
gratis or for a fee, you must give the recipients all the rights that
|
|
||||||
you have. 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.
|
|
||||||
|
|
||||||
We protect your rights with two steps: (1) copyright the software, and
|
|
||||||
(2) offer you this license which gives you legal permission to copy,
|
|
||||||
distribute and/or modify the software.
|
|
||||||
|
|
||||||
Also, for each author's protection and ours, we want to make certain
|
|
||||||
that everyone understands that there is no warranty for this free
|
|
||||||
software. If the software is modified by someone else and passed on, we
|
|
||||||
want its recipients to know that what they have is not the original, so
|
|
||||||
that any problems introduced by others will not reflect on the original
|
|
||||||
authors' reputations.
|
|
||||||
|
|
||||||
Finally, any free program is threatened constantly by software
|
|
||||||
patents. We wish to avoid the danger that redistributors of a free
|
|
||||||
program will individually obtain patent licenses, in effect making the
|
|
||||||
program proprietary. To prevent this, we have made it clear that any
|
|
||||||
patent must be licensed for everyone's free use or not licensed at all.
|
|
||||||
|
|
||||||
The precise terms and conditions for copying, distribution and
|
|
||||||
modification follow.
|
|
||||||
|
|
||||||
GNU GENERAL PUBLIC LICENSE
|
|
||||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
|
||||||
|
|
||||||
0. This License applies to any program or other work which contains
|
|
||||||
a notice placed by the copyright holder saying it may be distributed
|
|
||||||
under the terms of this General Public License. The "Program", below,
|
|
||||||
refers to any such program or work, and a "work based on the Program"
|
|
||||||
means either the Program or any derivative work under copyright law:
|
|
||||||
that is to say, a work containing the Program or a portion of it,
|
|
||||||
either verbatim or with modifications and/or translated into another
|
|
||||||
language. (Hereinafter, translation is included without limitation in
|
|
||||||
the term "modification".) Each licensee is addressed as "you".
|
|
||||||
|
|
||||||
Activities other than copying, distribution and modification are not
|
|
||||||
covered by this License; they are outside its scope. The act of
|
|
||||||
running the Program is not restricted, and the output from the Program
|
|
||||||
is covered only if its contents constitute a work based on the
|
|
||||||
Program (independent of having been made by running the Program).
|
|
||||||
Whether that is true depends on what the Program does.
|
|
||||||
|
|
||||||
1. You may copy and distribute 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 and disclaimer of warranty; keep intact all the
|
|
||||||
notices that refer to this License and to the absence of any warranty;
|
|
||||||
and give any other recipients of the Program a copy of this License
|
|
||||||
along with the Program.
|
|
||||||
|
|
||||||
You may charge a fee for the physical act of transferring a copy, and
|
|
||||||
you may at your option offer warranty protection in exchange for a fee.
|
|
||||||
|
|
||||||
2. You may modify your copy or copies of the Program or any portion
|
|
||||||
of it, thus forming a work based on the Program, and copy and
|
|
||||||
distribute such modifications or work under the terms of Section 1
|
|
||||||
above, provided that you also meet all of these conditions:
|
|
||||||
|
|
||||||
a) You must cause the modified files to carry prominent notices
|
|
||||||
stating that you changed the files and the date of any change.
|
|
||||||
|
|
||||||
b) You must cause any work that you distribute or publish, that in
|
|
||||||
whole or in part contains or is derived from the Program or any
|
|
||||||
part thereof, to be licensed as a whole at no charge to all third
|
|
||||||
parties under the terms of this License.
|
|
||||||
|
|
||||||
c) If the modified program normally reads commands interactively
|
|
||||||
when run, you must cause it, when started running for such
|
|
||||||
interactive use in the most ordinary way, to print or display an
|
|
||||||
announcement including an appropriate copyright notice and a
|
|
||||||
notice that there is no warranty (or else, saying that you provide
|
|
||||||
a warranty) and that users may redistribute the program under
|
|
||||||
these conditions, and telling the user how to view a copy of this
|
|
||||||
License. (Exception: if the Program itself is interactive but
|
|
||||||
does not normally print such an announcement, your work based on
|
|
||||||
the Program is not required to print an announcement.)
|
|
||||||
|
|
||||||
These requirements apply to the modified work as a whole. If
|
|
||||||
identifiable sections of that work are not derived from the Program,
|
|
||||||
and can be reasonably considered independent and separate works in
|
|
||||||
themselves, then this License, and its terms, do not apply to those
|
|
||||||
sections when you distribute them as separate works. But when you
|
|
||||||
distribute the same sections as part of a whole which is a work based
|
|
||||||
on the Program, the distribution of the whole must be on the terms of
|
|
||||||
this License, whose permissions for other licensees extend to the
|
|
||||||
entire whole, and thus to each and every part regardless of who wrote it.
|
|
||||||
|
|
||||||
Thus, it is not the intent of this section to claim rights or contest
|
|
||||||
your rights to work written entirely by you; rather, the intent is to
|
|
||||||
exercise the right to control the distribution of derivative or
|
|
||||||
collective works based on the Program.
|
|
||||||
|
|
||||||
In addition, mere aggregation of another work not based on the Program
|
|
||||||
with the Program (or with a work based on the Program) on a volume of
|
|
||||||
a storage or distribution medium does not bring the other work under
|
|
||||||
the scope of this License.
|
|
||||||
|
|
||||||
3. You may copy and distribute the Program (or a work based on it,
|
|
||||||
under Section 2) in object code or executable form under the terms of
|
|
||||||
Sections 1 and 2 above provided that you also do one of the following:
|
|
||||||
|
|
||||||
a) Accompany it with the complete corresponding machine-readable
|
|
||||||
source code, which must be distributed under the terms of Sections
|
|
||||||
1 and 2 above on a medium customarily used for software interchange; or,
|
|
||||||
|
|
||||||
b) Accompany it with a written offer, valid for at least three
|
|
||||||
years, to give any third party, for a charge no more than your
|
|
||||||
cost of physically performing source distribution, a complete
|
|
||||||
machine-readable copy of the corresponding source code, to be
|
|
||||||
distributed under the terms of Sections 1 and 2 above on a medium
|
|
||||||
customarily used for software interchange; or,
|
|
||||||
|
|
||||||
c) Accompany it with the information you received as to the offer
|
|
||||||
to distribute corresponding source code. (This alternative is
|
|
||||||
allowed only for noncommercial distribution and only if you
|
|
||||||
received the program in object code or executable form with such
|
|
||||||
an offer, in accord with Subsection b above.)
|
|
||||||
|
|
||||||
The source code for a work means the preferred form of the work for
|
|
||||||
making modifications to it. For an executable work, complete source
|
|
||||||
code means all the source code for all modules it contains, plus any
|
|
||||||
associated interface definition files, plus the scripts used to
|
|
||||||
control compilation and installation of the executable. However, as a
|
|
||||||
special exception, the source code distributed need not include
|
|
||||||
anything that is normally distributed (in either source or binary
|
|
||||||
form) with the major components (compiler, kernel, and so on) of the
|
|
||||||
operating system on which the executable runs, unless that component
|
|
||||||
itself accompanies the executable.
|
|
||||||
|
|
||||||
If distribution of executable or object code is made by offering
|
|
||||||
access to copy from a designated place, then offering equivalent
|
|
||||||
access to copy the source code from the same place counts as
|
|
||||||
distribution of the source code, even though third parties are not
|
|
||||||
compelled to copy the source along with the object code.
|
|
||||||
|
|
||||||
4. You may not copy, modify, sublicense, or distribute the Program
|
|
||||||
except as expressly provided under this License. Any attempt
|
|
||||||
otherwise to copy, modify, sublicense or distribute the Program is
|
|
||||||
void, and will automatically terminate your rights under this License.
|
|
||||||
However, parties who have received copies, or rights, from you under
|
|
||||||
this License will not have their licenses terminated so long as such
|
|
||||||
parties remain in full compliance.
|
|
||||||
|
|
||||||
5. You are not required to accept this License, since you have not
|
|
||||||
signed it. However, nothing else grants you permission to modify or
|
|
||||||
distribute the Program or its derivative works. These actions are
|
|
||||||
prohibited by law if you do not accept this License. Therefore, by
|
|
||||||
modifying or distributing the Program (or any work based on the
|
|
||||||
Program), you indicate your acceptance of this License to do so, and
|
|
||||||
all its terms and conditions for copying, distributing or modifying
|
|
||||||
the Program or works based on it.
|
|
||||||
|
|
||||||
6. Each time you redistribute the Program (or any work based on the
|
|
||||||
Program), the recipient automatically receives a license from the
|
|
||||||
original licensor to copy, distribute or modify the Program subject to
|
|
||||||
these terms and conditions. You may not impose any further
|
|
||||||
restrictions on the recipients' exercise of the rights granted herein.
|
|
||||||
You are not responsible for enforcing compliance by third parties to
|
|
||||||
this License.
|
|
||||||
|
|
||||||
7. If, as a consequence of a court judgment or allegation of patent
|
|
||||||
infringement or for any other reason (not limited to patent issues),
|
|
||||||
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
|
|
||||||
distribute so as to satisfy simultaneously your obligations under this
|
|
||||||
License and any other pertinent obligations, then as a consequence you
|
|
||||||
may not distribute the Program at all. For example, if a patent
|
|
||||||
license would not permit royalty-free redistribution of the Program by
|
|
||||||
all those who receive copies directly or indirectly through you, then
|
|
||||||
the only way you could satisfy both it and this License would be to
|
|
||||||
refrain entirely from distribution of the Program.
|
|
||||||
|
|
||||||
If any portion of this section is held invalid or unenforceable under
|
|
||||||
any particular circumstance, the balance of the section is intended to
|
|
||||||
apply and the section as a whole is intended to apply in other
|
|
||||||
circumstances.
|
|
||||||
|
|
||||||
It is not the purpose of this section to induce you to infringe any
|
|
||||||
patents or other property right claims or to contest validity of any
|
|
||||||
such claims; this section has the sole purpose of protecting the
|
|
||||||
integrity of the free software distribution system, which is
|
|
||||||
implemented by public license practices. Many people have made
|
|
||||||
generous contributions to the wide range of software distributed
|
|
||||||
through that system in reliance on consistent application of that
|
|
||||||
system; it is up to the author/donor to decide if he or she is willing
|
|
||||||
to distribute software through any other system and a licensee cannot
|
|
||||||
impose that choice.
|
|
||||||
|
|
||||||
This section is intended to make thoroughly clear what is believed to
|
|
||||||
be a consequence of the rest of this License.
|
|
||||||
|
|
||||||
8. If the distribution and/or use of the Program is restricted in
|
|
||||||
certain countries either by patents or by copyrighted interfaces, the
|
|
||||||
original copyright holder who places the Program under this License
|
|
||||||
may add an explicit geographical distribution limitation excluding
|
|
||||||
those countries, so that distribution is permitted only in or among
|
|
||||||
countries not thus excluded. In such case, this License incorporates
|
|
||||||
the limitation as if written in the body of this License.
|
|
||||||
|
|
||||||
9. The Free Software Foundation may publish revised and/or new versions
|
|
||||||
of the 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 a version number of this License which applies to it and "any
|
|
||||||
later version", you have the option of following the terms and conditions
|
|
||||||
either of that version or of any later version published by the Free
|
|
||||||
Software Foundation. If the Program does not specify a version number of
|
|
||||||
this License, you may choose any version ever published by the Free Software
|
|
||||||
Foundation.
|
|
||||||
|
|
||||||
10. If you wish to incorporate parts of the Program into other free
|
|
||||||
programs whose distribution conditions are different, write to the author
|
|
||||||
to ask for permission. For software which is copyrighted by the Free
|
|
||||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
|
||||||
make exceptions for this. Our decision will be guided by the two goals
|
|
||||||
of preserving the free status of all derivatives of our free software and
|
|
||||||
of promoting the sharing and reuse of software generally.
|
|
||||||
|
|
||||||
NO WARRANTY
|
|
||||||
|
|
||||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, 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.
|
|
||||||
|
|
||||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
|
||||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
|
||||||
REDISTRIBUTE 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.
|
|
||||||
|
|
||||||
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
|
|
||||||
convey 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 2 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, write to the Free Software
|
|
||||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
||||||
|
|
||||||
|
|
||||||
Also add information on how to contact you by electronic and paper mail.
|
|
||||||
|
|
||||||
If the program is interactive, make it output a short notice like this
|
|
||||||
when it starts in an interactive mode:
|
|
||||||
|
|
||||||
Gnomovision version 69, Copyright (C) year name of author
|
|
||||||
Gnomovision 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, the commands you use may
|
|
||||||
be called something other than `show w' and `show c'; they could even be
|
|
||||||
mouse-clicks or menu items--whatever suits your program.
|
|
||||||
|
|
||||||
You should also get your employer (if you work as a programmer) or your
|
|
||||||
school, if any, to sign a "copyright disclaimer" for the program, if
|
|
||||||
necessary. Here is a sample; alter the names:
|
|
||||||
|
|
||||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
|
||||||
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
|
||||||
|
|
||||||
<signature of Ty Coon>, 1 April 1989
|
|
||||||
Ty Coon, President of Vice
|
|
||||||
|
|
||||||
This 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 Library General
|
|
||||||
Public License instead of this License.
|
|
||||||
@@ -1,231 +0,0 @@
|
|||||||
# Doxyfile 1.5.3
|
|
||||||
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
# Project related configuration options
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
DOXYFILE_ENCODING = UTF-8
|
|
||||||
PROJECT_NAME = OpenAirInterface
|
|
||||||
PROJECT_NUMBER = V1.0
|
|
||||||
OUTPUT_DIRECTORY =
|
|
||||||
CREATE_SUBDIRS = NO
|
|
||||||
OUTPUT_LANGUAGE = English
|
|
||||||
BRIEF_MEMBER_DESC = YES
|
|
||||||
REPEAT_BRIEF = YES
|
|
||||||
ABBREVIATE_BRIEF =
|
|
||||||
ALWAYS_DETAILED_SEC = NO
|
|
||||||
INLINE_INHERITED_MEMB = NO
|
|
||||||
FULL_PATH_NAMES = YES
|
|
||||||
STRIP_FROM_PATH =
|
|
||||||
STRIP_FROM_INC_PATH =
|
|
||||||
SHORT_NAMES = NO
|
|
||||||
JAVADOC_AUTOBRIEF = NO
|
|
||||||
QT_AUTOBRIEF = NO
|
|
||||||
MULTILINE_CPP_IS_BRIEF = NO
|
|
||||||
DETAILS_AT_TOP = NO
|
|
||||||
INHERIT_DOCS = YES
|
|
||||||
SEPARATE_MEMBER_PAGES = NO
|
|
||||||
TAB_SIZE = 8
|
|
||||||
ALIASES =
|
|
||||||
OPTIMIZE_OUTPUT_FOR_C = NO
|
|
||||||
OPTIMIZE_OUTPUT_JAVA = NO
|
|
||||||
BUILTIN_STL_SUPPORT = NO
|
|
||||||
CPP_CLI_SUPPORT = NO
|
|
||||||
DISTRIBUTE_GROUP_DOC = NO
|
|
||||||
SUBGROUPING = YES
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
# Build related configuration options
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
EXTRACT_ALL = NO
|
|
||||||
EXTRACT_PRIVATE = NO
|
|
||||||
EXTRACT_STATIC = NO
|
|
||||||
EXTRACT_LOCAL_CLASSES = YES
|
|
||||||
EXTRACT_LOCAL_METHODS = NO
|
|
||||||
EXTRACT_ANON_NSPACES = NO
|
|
||||||
HIDE_UNDOC_MEMBERS = NO
|
|
||||||
HIDE_UNDOC_CLASSES = NO
|
|
||||||
HIDE_FRIEND_COMPOUNDS = NO
|
|
||||||
HIDE_IN_BODY_DOCS = NO
|
|
||||||
INTERNAL_DOCS = NO
|
|
||||||
CASE_SENSE_NAMES = YES
|
|
||||||
HIDE_SCOPE_NAMES = NO
|
|
||||||
SHOW_INCLUDE_FILES = YES
|
|
||||||
INLINE_INFO = YES
|
|
||||||
SORT_MEMBER_DOCS = YES
|
|
||||||
SORT_BRIEF_DOCS = NO
|
|
||||||
SORT_BY_SCOPE_NAME = NO
|
|
||||||
GENERATE_TODOLIST = YES
|
|
||||||
GENERATE_TESTLIST = YES
|
|
||||||
GENERATE_BUGLIST = YES
|
|
||||||
GENERATE_DEPRECATEDLIST= YES
|
|
||||||
ENABLED_SECTIONS =
|
|
||||||
MAX_INITIALIZER_LINES = 30
|
|
||||||
SHOW_USED_FILES = YES
|
|
||||||
SHOW_DIRECTORIES = NO
|
|
||||||
FILE_VERSION_FILTER =
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
# configuration options related to warning and progress messages
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
QUIET = NO
|
|
||||||
WARNINGS = YES
|
|
||||||
WARN_IF_UNDOCUMENTED = YES
|
|
||||||
WARN_IF_DOC_ERROR = YES
|
|
||||||
WARN_NO_PARAMDOC = NO
|
|
||||||
WARN_FORMAT = "$file:$line: $text"
|
|
||||||
WARN_LOGFILE =
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
# configuration options related to the input files
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
INPUT = example_doxy.h
|
|
||||||
INPUT_ENCODING = UTF-8
|
|
||||||
FILE_PATTERNS =
|
|
||||||
RECURSIVE = NO
|
|
||||||
EXCLUDE =
|
|
||||||
EXCLUDE_SYMLINKS = NO
|
|
||||||
EXCLUDE_PATTERNS =
|
|
||||||
EXCLUDE_SYMBOLS =
|
|
||||||
EXAMPLE_PATH =
|
|
||||||
EXAMPLE_PATTERNS =
|
|
||||||
EXAMPLE_RECURSIVE = NO
|
|
||||||
IMAGE_PATH = images/
|
|
||||||
INPUT_FILTER =
|
|
||||||
FILTER_PATTERNS =
|
|
||||||
FILTER_SOURCE_FILES = NO
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
# configuration options related to source browsing
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
SOURCE_BROWSER = NO
|
|
||||||
INLINE_SOURCES = NO
|
|
||||||
STRIP_CODE_COMMENTS = YES
|
|
||||||
REFERENCED_BY_RELATION = YES
|
|
||||||
REFERENCES_RELATION = YES
|
|
||||||
REFERENCES_LINK_SOURCE = YES
|
|
||||||
USE_HTAGS = NO
|
|
||||||
VERBATIM_HEADERS = YES
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
# configuration options related to the alphabetical class index
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
ALPHABETICAL_INDEX = NO
|
|
||||||
COLS_IN_ALPHA_INDEX = 5
|
|
||||||
IGNORE_PREFIX =
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
# configuration options related to the HTML output
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
GENERATE_HTML = YES
|
|
||||||
HTML_OUTPUT = html
|
|
||||||
HTML_FILE_EXTENSION = .html
|
|
||||||
HTML_HEADER =
|
|
||||||
HTML_FOOTER =
|
|
||||||
HTML_STYLESHEET =
|
|
||||||
HTML_ALIGN_MEMBERS = YES
|
|
||||||
GENERATE_HTMLHELP = NO
|
|
||||||
HTML_DYNAMIC_SECTIONS = NO
|
|
||||||
CHM_FILE =
|
|
||||||
HHC_LOCATION =
|
|
||||||
GENERATE_CHI = NO
|
|
||||||
BINARY_TOC = NO
|
|
||||||
TOC_EXPAND = NO
|
|
||||||
DISABLE_INDEX = NO
|
|
||||||
ENUM_VALUES_PER_LINE = 4
|
|
||||||
GENERATE_TREEVIEW = YES
|
|
||||||
TREEVIEW_WIDTH = 250
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
# configuration options related to the LaTeX output
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
GENERATE_LATEX = YES
|
|
||||||
LATEX_OUTPUT = latex
|
|
||||||
LATEX_CMD_NAME = latex
|
|
||||||
MAKEINDEX_CMD_NAME = makeindex
|
|
||||||
COMPACT_LATEX = NO
|
|
||||||
PAPER_TYPE = a4wide
|
|
||||||
EXTRA_PACKAGES =
|
|
||||||
LATEX_HEADER =
|
|
||||||
PDF_HYPERLINKS = NO
|
|
||||||
USE_PDFLATEX = NO
|
|
||||||
LATEX_BATCHMODE = NO
|
|
||||||
LATEX_HIDE_INDICES = NO
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
# configuration options related to the RTF output
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
GENERATE_RTF = NO
|
|
||||||
RTF_OUTPUT = rtf
|
|
||||||
COMPACT_RTF = NO
|
|
||||||
RTF_HYPERLINKS = NO
|
|
||||||
RTF_STYLESHEET_FILE =
|
|
||||||
RTF_EXTENSIONS_FILE =
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
# configuration options related to the man page output
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
GENERATE_MAN = NO
|
|
||||||
MAN_OUTPUT = man
|
|
||||||
MAN_EXTENSION = .3
|
|
||||||
MAN_LINKS = NO
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
# configuration options related to the XML output
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
GENERATE_XML = NO
|
|
||||||
XML_OUTPUT = xml
|
|
||||||
XML_SCHEMA =
|
|
||||||
XML_DTD =
|
|
||||||
XML_PROGRAMLISTING = YES
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
# configuration options for the AutoGen Definitions output
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
GENERATE_AUTOGEN_DEF = NO
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
# configuration options related to the Perl module output
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
GENERATE_PERLMOD = NO
|
|
||||||
PERLMOD_LATEX = NO
|
|
||||||
PERLMOD_PRETTY = YES
|
|
||||||
PERLMOD_MAKEVAR_PREFIX =
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
# Configuration options related to the preprocessor
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
ENABLE_PREPROCESSING = YES
|
|
||||||
MACRO_EXPANSION = NO
|
|
||||||
EXPAND_ONLY_PREDEF = NO
|
|
||||||
SEARCH_INCLUDES = YES
|
|
||||||
INCLUDE_PATH =
|
|
||||||
INCLUDE_FILE_PATTERNS =
|
|
||||||
PREDEFINED =
|
|
||||||
EXPAND_AS_DEFINED =
|
|
||||||
SKIP_FUNCTION_MACROS = YES
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
# Configuration::additions related to external references
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
TAGFILES =
|
|
||||||
GENERATE_TAGFILE =
|
|
||||||
ALLEXTERNALS = NO
|
|
||||||
EXTERNAL_GROUPS = YES
|
|
||||||
PERL_PATH = /usr/bin/perl
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
# Configuration options related to the dot tool
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
CLASS_DIAGRAMS = YES
|
|
||||||
MSCGEN_PATH =
|
|
||||||
HIDE_UNDOC_RELATIONS = YES
|
|
||||||
HAVE_DOT = NO
|
|
||||||
CLASS_GRAPH = YES
|
|
||||||
COLLABORATION_GRAPH = YES
|
|
||||||
GROUP_GRAPHS = YES
|
|
||||||
UML_LOOK = NO
|
|
||||||
TEMPLATE_RELATIONS = NO
|
|
||||||
INCLUDE_GRAPH = YES
|
|
||||||
INCLUDED_BY_GRAPH = YES
|
|
||||||
CALL_GRAPH = NO
|
|
||||||
CALLER_GRAPH = NO
|
|
||||||
GRAPHICAL_HIERARCHY = YES
|
|
||||||
DIRECTORY_GRAPH = YES
|
|
||||||
DOT_IMAGE_FORMAT = png
|
|
||||||
DOT_PATH = /usr/bin/dot
|
|
||||||
DOTFILE_DIRS =
|
|
||||||
DOT_GRAPH_MAX_NODES = 50
|
|
||||||
MAX_DOT_GRAPH_DEPTH = 0
|
|
||||||
DOT_TRANSPARENT = NO
|
|
||||||
DOT_MULTI_TARGETS = NO
|
|
||||||
GENERATE_LEGEND = YES
|
|
||||||
DOT_CLEANUP = YES
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
# Configuration::additions related to the search engine
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
SEARCHENGINE = NO
|
|
||||||
@@ -1,149 +0,0 @@
|
|||||||
/*******************************************************************************
|
|
||||||
|
|
||||||
Eurecom OpenAirInterface 3
|
|
||||||
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.fsr/openairinterface
|
|
||||||
Address : Eurecom, 2229, route des crêtes, 06560 Valbonne Sophia Antipolis, France
|
|
||||||
|
|
||||||
*******************************************************************************/
|
|
||||||
|
|
||||||
|
|
||||||
/*! \file doxy_template.h
|
|
||||||
* \brief explain how this block is organized, and how it works
|
|
||||||
* \author Navid Nikaein
|
|
||||||
* \date 2006-2010
|
|
||||||
* \version 4.0
|
|
||||||
* \company Eurecom
|
|
||||||
* \email: navid.nikaein@eurecom.fr
|
|
||||||
* \note this a note
|
|
||||||
* \bug this is a bug
|
|
||||||
* \warning this is a warning
|
|
||||||
*/
|
|
||||||
|
|
||||||
//-----------------------------------begin group-----------------------------
|
|
||||||
|
|
||||||
|
|
||||||
/** @defgroup _oai System definitions
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
There is different modules:
|
|
||||||
- OAI Address
|
|
||||||
- OAI Components
|
|
||||||
- \ref _frame
|
|
||||||
|
|
||||||
The following diagram is based on graphviz (http://www.graphviz.org/), you need to install the package to view the diagram.
|
|
||||||
|
|
||||||
* \dot
|
|
||||||
* digraph group_frame {
|
|
||||||
* node [shape=rect, fontname=Helvetica, fontsize=8,style=filled,fillcolor=lightgrey];
|
|
||||||
* a [ label = " address"];
|
|
||||||
* b [ label = " component"];
|
|
||||||
* c [ label = " frame",URL="\ref _frame"];
|
|
||||||
* a->b;
|
|
||||||
* a->c;
|
|
||||||
* b->d;
|
|
||||||
* label="Architecture"
|
|
||||||
*
|
|
||||||
* }
|
|
||||||
* \enddot
|
|
||||||
|
|
||||||
\section _doxy Doxygen Help
|
|
||||||
You can use the provided Doxyfile as the configuration file or alternatively run "doxygen -g Doxyfile" to generat the file.
|
|
||||||
You need at least to set the some variables in the Doxyfile including "PROJECT_NAME","PROJECT_NUMBER","INPUT","IMAGE_PATH".
|
|
||||||
Doxygen help and commands can be found at http://www.stack.nl/~dimitri/doxygen/commands.html#cmdprotocol
|
|
||||||
|
|
||||||
\section _arch Architecture
|
|
||||||
|
|
||||||
You need to set the IMAGE_PATH in your Doxyfile
|
|
||||||
|
|
||||||
\image html arch.png "Architecture"
|
|
||||||
\image latex arch.eps "Architecture"
|
|
||||||
|
|
||||||
\subsection _mac MAC
|
|
||||||
thisis the mac
|
|
||||||
\subsection _rlc RLC
|
|
||||||
this is the rlc
|
|
||||||
\subsection _impl Implementation
|
|
||||||
what about the implementation
|
|
||||||
|
|
||||||
|
|
||||||
*@{*/
|
|
||||||
|
|
||||||
/*!\brief OAI protocol verion */
|
|
||||||
#define OAI_PROTOCOL_Version 0x00
|
|
||||||
/*!\brief Length in bytes of the OAI address */
|
|
||||||
#define OAI_ADDR_LEN 6
|
|
||||||
|
|
||||||
/*!\brief OAI snode type */
|
|
||||||
enum NodeType {
|
|
||||||
/*!\brief mesh routers are */
|
|
||||||
meshrouter = 1,
|
|
||||||
/*!\brief relay nodes are */
|
|
||||||
relaynode = 2,
|
|
||||||
/*!\brief clusterheads are */
|
|
||||||
clusterhead = 3
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
/*@}*/
|
|
||||||
|
|
||||||
// --------------------------end group ------------------------------
|
|
||||||
|
|
||||||
|
|
||||||
//---------------------------begin group------------------------------
|
|
||||||
/** @defgroup _frame Frame Structure
|
|
||||||
* @ingroup _oai
|
|
||||||
The Frame is composed of ....
|
|
||||||
|
|
||||||
|
|
||||||
*@{*/
|
|
||||||
/*! \brief the frame structure is ... */
|
|
||||||
struct frame {
|
|
||||||
u_short duration; /*!< \brief Duration in us (2 bytes) */
|
|
||||||
u_char da[OAI_ADDR_LEN];/*!< \brief Destination MAC@ (OAI_ADDR_LEN bytes) */
|
|
||||||
u_char sa[OAI_ADDR_LEN];/*!< \brief Source MAC@ (OAI_ADDR_LEN bytes)*/
|
|
||||||
u_char body[0]; /*!< \brief Body of the frame */
|
|
||||||
};
|
|
||||||
/*! \brief Broadcast ID is ... */
|
|
||||||
#define BROADCAST_ID 15
|
|
||||||
|
|
||||||
|
|
||||||
/*@}*/
|
|
||||||
|
|
||||||
//--------------------------end group-----------------------
|
|
||||||
|
|
||||||
|
|
||||||
//-----------------------begin func proto-------------------
|
|
||||||
|
|
||||||
/*! \fn int init(int,int)
|
|
||||||
* \brief this function initializes and allocates memories and etc.
|
|
||||||
* \param[in] src the memory area to copy frrm
|
|
||||||
* \param[out] dst the memory area to copy to
|
|
||||||
* \return 0 on success, otherwise -1
|
|
||||||
* \note
|
|
||||||
* @ingroup _oai
|
|
||||||
*/
|
|
||||||
int init(int src, int dst);
|
|
||||||
|
|
||||||
//-----------------------end func proto-------------------
|
|
||||||
@@ -1,785 +0,0 @@
|
|||||||
%!PS-Adobe-2.0 EPSF-2.0
|
|
||||||
%%Title: /homes/nikaeinn/templates/dev/arch.dia
|
|
||||||
%%Creator: Dia v0.95
|
|
||||||
%%CreationDate: Fri Dec 11 12:31:01 2009
|
|
||||||
%%For: nikaeinn
|
|
||||||
%%Orientation: Portrait
|
|
||||||
%%Magnification: 1.0000
|
|
||||||
%%BoundingBox: 0 0 355 138
|
|
||||||
%%BeginSetup
|
|
||||||
%%EndSetup
|
|
||||||
%%EndComments
|
|
||||||
%%BeginProlog
|
|
||||||
[ /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
|
|
||||||
/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
|
|
||||||
/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
|
|
||||||
/.notdef /.notdef /space /exclam /quotedbl /numbersign /dollar /percent /ampersand /quoteright
|
|
||||||
/parenleft /parenright /asterisk /plus /comma /hyphen /period /slash /zero /one
|
|
||||||
/two /three /four /five /six /seven /eight /nine /colon /semicolon
|
|
||||||
/less /equal /greater /question /at /A /B /C /D /E
|
|
||||||
/F /G /H /I /J /K /L /M /N /O
|
|
||||||
/P /Q /R /S /T /U /V /W /X /Y
|
|
||||||
/Z /bracketleft /backslash /bracketright /asciicircum /underscore /quoteleft /a /b /c
|
|
||||||
/d /e /f /g /h /i /j /k /l /m
|
|
||||||
/n /o /p /q /r /s /t /u /v /w
|
|
||||||
/x /y /z /braceleft /bar /braceright /asciitilde /.notdef /.notdef /.notdef
|
|
||||||
/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
|
|
||||||
/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
|
|
||||||
/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
|
|
||||||
/space /exclamdown /cent /sterling /currency /yen /brokenbar /section /dieresis /copyright
|
|
||||||
/ordfeminine /guillemotleft /logicalnot /hyphen /registered /macron /degree /plusminus /twosuperior /threesuperior
|
|
||||||
/acute /mu /paragraph /periodcentered /cedilla /onesuperior /ordmasculine /guillemotright /onequarter /onehalf
|
|
||||||
/threequarters /questiondown /Agrave /Aacute /Acircumflex /Atilde /Adieresis /Aring /AE /Ccedilla
|
|
||||||
/Egrave /Eacute /Ecircumflex /Edieresis /Igrave /Iacute /Icircumflex /Idieresis /Eth /Ntilde
|
|
||||||
/Ograve /Oacute /Ocircumflex /Otilde /Odieresis /multiply /Oslash /Ugrave /Uacute /Ucircumflex
|
|
||||||
/Udieresis /Yacute /Thorn /germandbls /agrave /aacute /acircumflex /atilde /adieresis /aring
|
|
||||||
/ae /ccedilla /egrave /eacute /ecircumflex /edieresis /igrave /iacute /icircumflex /idieresis
|
|
||||||
/eth /ntilde /ograve /oacute /ocircumflex /otilde /odieresis /divide /oslash /ugrave
|
|
||||||
/uacute /ucircumflex /udieresis /yacute /thorn /ydieresis] /isolatin1encoding exch def
|
|
||||||
/cp {closepath} bind def
|
|
||||||
/c {curveto} bind def
|
|
||||||
/f {fill} bind def
|
|
||||||
/a {arc} bind def
|
|
||||||
/ef {eofill} bind def
|
|
||||||
/ex {exch} bind def
|
|
||||||
/gr {grestore} bind def
|
|
||||||
/gs {gsave} bind def
|
|
||||||
/sa {save} bind def
|
|
||||||
/rs {restore} bind def
|
|
||||||
/l {lineto} bind def
|
|
||||||
/m {moveto} bind def
|
|
||||||
/rm {rmoveto} bind def
|
|
||||||
/n {newpath} bind def
|
|
||||||
/s {stroke} bind def
|
|
||||||
/sh {show} bind def
|
|
||||||
/slc {setlinecap} bind def
|
|
||||||
/slj {setlinejoin} bind def
|
|
||||||
/slw {setlinewidth} bind def
|
|
||||||
/srgb {setrgbcolor} bind def
|
|
||||||
/rot {rotate} bind def
|
|
||||||
/sc {scale} bind def
|
|
||||||
/sd {setdash} bind def
|
|
||||||
/ff {findfont} bind def
|
|
||||||
/sf {setfont} bind def
|
|
||||||
/scf {scalefont} bind def
|
|
||||||
/sw {stringwidth pop} bind def
|
|
||||||
/tr {translate} bind def
|
|
||||||
|
|
||||||
/ellipsedict 8 dict def
|
|
||||||
ellipsedict /mtrx matrix put
|
|
||||||
/ellipse
|
|
||||||
{ ellipsedict begin
|
|
||||||
/endangle exch def
|
|
||||||
/startangle exch def
|
|
||||||
/yrad exch def
|
|
||||||
/xrad exch def
|
|
||||||
/y exch def
|
|
||||||
/x exch def /savematrix mtrx currentmatrix def
|
|
||||||
x y tr xrad yrad sc
|
|
||||||
0 0 1 startangle endangle arc
|
|
||||||
savematrix setmatrix
|
|
||||||
end
|
|
||||||
} def
|
|
||||||
|
|
||||||
/mergeprocs {
|
|
||||||
dup length
|
|
||||||
3 -1 roll
|
|
||||||
dup
|
|
||||||
length
|
|
||||||
dup
|
|
||||||
5 1 roll
|
|
||||||
3 -1 roll
|
|
||||||
add
|
|
||||||
array cvx
|
|
||||||
dup
|
|
||||||
3 -1 roll
|
|
||||||
0 exch
|
|
||||||
putinterval
|
|
||||||
dup
|
|
||||||
4 2 roll
|
|
||||||
putinterval
|
|
||||||
} bind def
|
|
||||||
/dpi_x 300 def
|
|
||||||
/dpi_y 300 def
|
|
||||||
/conicto {
|
|
||||||
/to_y exch def
|
|
||||||
/to_x exch def
|
|
||||||
/conic_cntrl_y exch def
|
|
||||||
/conic_cntrl_x exch def
|
|
||||||
currentpoint
|
|
||||||
/p0_y exch def
|
|
||||||
/p0_x exch def
|
|
||||||
/p1_x p0_x conic_cntrl_x p0_x sub 2 3 div mul add def
|
|
||||||
/p1_y p0_y conic_cntrl_y p0_y sub 2 3 div mul add def
|
|
||||||
/p2_x p1_x to_x p0_x sub 1 3 div mul add def
|
|
||||||
/p2_y p1_y to_y p0_y sub 1 3 div mul add def
|
|
||||||
p1_x p1_y p2_x p2_y to_x to_y curveto
|
|
||||||
} bind def
|
|
||||||
/start_ol { gsave 1.1 dpi_x div dup scale} bind def
|
|
||||||
/end_ol { closepath fill grestore } bind def
|
|
||||||
28.346000 -28.346000 scale
|
|
||||||
-4.400000 -8.150000 translate
|
|
||||||
%%EndProlog
|
|
||||||
|
|
||||||
|
|
||||||
1.000000 1.000000 1.000000 srgb
|
|
||||||
n 4.450000 3.350000 m 4.450000 8.100000 l 16.850000 8.100000 l 16.850000 3.350000 l f
|
|
||||||
0.100000 slw
|
|
||||||
[] 0 sd
|
|
||||||
[] 0 sd
|
|
||||||
0 slj
|
|
||||||
0.000000 0.000000 0.000000 srgb
|
|
||||||
n 4.450000 3.350000 m 4.450000 8.100000 l 16.850000 8.100000 l 16.850000 3.350000 l cp s
|
|
||||||
gsave 8.875000 4.300000 translate 0.035278 -0.035278 scale
|
|
||||||
start_ol
|
|
||||||
1762 3044 moveto
|
|
||||||
1276 3044 990 2673 conicto
|
|
||||||
704 2303 704 1663 conicto
|
|
||||||
704 1025 990 654 conicto
|
|
||||||
1276 284 1762 284 conicto
|
|
||||||
2248 284 2532 654 conicto
|
|
||||||
2816 1025 2816 1663 conicto
|
|
||||||
2816 2303 2532 2673 conicto
|
|
||||||
2248 3044 1762 3044 conicto
|
|
||||||
1762 3392 moveto
|
|
||||||
2446 3392 2855 2922 conicto
|
|
||||||
3264 2453 3264 1664 conicto
|
|
||||||
3264 876 2855 406 conicto
|
|
||||||
2446 -64 1762 -64 conicto
|
|
||||||
1077 -64 666 405 conicto
|
|
||||||
256 874 256 1664 conicto
|
|
||||||
256 2453 666 2922 conicto
|
|
||||||
1077 3392 1762 3392 conicto
|
|
||||||
end_ol grestore
|
|
||||||
gsave 9.330083 4.300000 translate 0.035278 -0.035278 scale
|
|
||||||
start_ol
|
|
||||||
1536 2838 moveto
|
|
||||||
935 1180 lineto
|
|
||||||
2140 1180 lineto
|
|
||||||
1536 2838 lineto
|
|
||||||
1286 3282 moveto
|
|
||||||
1789 3282 lineto
|
|
||||||
3038 0 lineto
|
|
||||||
2577 0 lineto
|
|
||||||
2278 832 lineto
|
|
||||||
801 832 lineto
|
|
||||||
503 0 lineto
|
|
||||||
35 0 lineto
|
|
||||||
1286 3282 lineto
|
|
||||||
end_ol grestore
|
|
||||||
gsave 9.736483 4.300000 translate 0.035278 -0.035278 scale
|
|
||||||
start_ol
|
|
||||||
448 3328 moveto
|
|
||||||
874 3328 lineto
|
|
||||||
874 0 lineto
|
|
||||||
448 0 lineto
|
|
||||||
448 3328 lineto
|
|
||||||
end_ol grestore
|
|
||||||
gsave 9.914283 4.300000 translate 0.035278 -0.035278 scale
|
|
||||||
start_ol
|
|
||||||
end_ol grestore
|
|
||||||
gsave 10.100550 4.300000 translate 0.035278 -0.035278 scale
|
|
||||||
start_ol
|
|
||||||
1536 2838 moveto
|
|
||||||
935 1180 lineto
|
|
||||||
2140 1180 lineto
|
|
||||||
1536 2838 lineto
|
|
||||||
1286 3282 moveto
|
|
||||||
1789 3282 lineto
|
|
||||||
3038 0 lineto
|
|
||||||
2577 0 lineto
|
|
||||||
2278 832 lineto
|
|
||||||
801 832 lineto
|
|
||||||
503 0 lineto
|
|
||||||
35 0 lineto
|
|
||||||
1286 3282 lineto
|
|
||||||
end_ol grestore
|
|
||||||
gsave 10.506950 4.300000 translate 0.035278 -0.035278 scale
|
|
||||||
start_ol
|
|
||||||
1842 2133 moveto
|
|
||||||
1776 2174 1696 2193 conicto
|
|
||||||
1616 2212 1519 2212 conicto
|
|
||||||
1177 2212 993 1983 conicto
|
|
||||||
810 1755 810 1328 conicto
|
|
||||||
810 0 lineto
|
|
||||||
384 0 lineto
|
|
||||||
384 2496 lineto
|
|
||||||
810 2496 lineto
|
|
||||||
810 2129 lineto
|
|
||||||
937 2347 1141 2453 conicto
|
|
||||||
1345 2560 1638 2560 conicto
|
|
||||||
1680 2560 1730 2554 conicto
|
|
||||||
1781 2548 1842 2536 conicto
|
|
||||||
1842 2133 lineto
|
|
||||||
end_ol grestore
|
|
||||||
gsave 10.752483 4.300000 translate 0.035278 -0.035278 scale
|
|
||||||
start_ol
|
|
||||||
2176 2404 moveto
|
|
||||||
2176 2020 lineto
|
|
||||||
2008 2116 1838 2164 conicto
|
|
||||||
1669 2212 1496 2212 conicto
|
|
||||||
1109 2212 895 1958 conicto
|
|
||||||
682 1705 682 1248 conicto
|
|
||||||
682 791 895 537 conicto
|
|
||||||
1109 284 1496 284 conicto
|
|
||||||
1669 284 1838 332 conicto
|
|
||||||
2008 380 2176 476 conicto
|
|
||||||
2176 97 lineto
|
|
||||||
2009 17 1830 -23 conicto
|
|
||||||
1652 -64 1449 -64 conicto
|
|
||||||
902 -64 579 291 conicto
|
|
||||||
256 646 256 1248 conicto
|
|
||||||
256 1859 582 2209 conicto
|
|
||||||
909 2560 1476 2560 conicto
|
|
||||||
1660 2560 1835 2521 conicto
|
|
||||||
2011 2482 2176 2404 conicto
|
|
||||||
end_ol grestore
|
|
||||||
gsave 11.074217 4.300000 translate 0.035278 -0.035278 scale
|
|
||||||
start_ol
|
|
||||||
2474 1509 moveto
|
|
||||||
2474 0 lineto
|
|
||||||
2048 0 lineto
|
|
||||||
2048 1502 lineto
|
|
||||||
2048 1858 1913 2035 conicto
|
|
||||||
1778 2212 1509 2212 conicto
|
|
||||||
1185 2212 997 1999 conicto
|
|
||||||
810 1786 810 1419 conicto
|
|
||||||
810 0 lineto
|
|
||||||
384 0 lineto
|
|
||||||
384 3456 lineto
|
|
||||||
810 3456 lineto
|
|
||||||
810 2120 lineto
|
|
||||||
954 2343 1152 2451 conicto
|
|
||||||
1350 2560 1609 2560 conicto
|
|
||||||
2037 2560 2255 2293 conicto
|
|
||||||
2474 2027 2474 1509 conicto
|
|
||||||
end_ol grestore
|
|
||||||
1.000000 1.000000 1.000000 srgb
|
|
||||||
n 4.900000 6.250000 m 4.900000 7.500000 l 8.250000 7.500000 l 8.250000 6.250000 l f
|
|
||||||
0.100000 slw
|
|
||||||
[] 0 sd
|
|
||||||
[] 0 sd
|
|
||||||
0 slj
|
|
||||||
0.000000 0.000000 0.000000 srgb
|
|
||||||
n 4.900000 6.250000 m 4.900000 7.500000 l 8.250000 7.500000 l 8.250000 6.250000 l cp s
|
|
||||||
1.000000 1.000000 1.000000 srgb
|
|
||||||
n 8.900000 6.200000 m 8.900000 7.495000 l 12.500000 7.495000 l 12.500000 6.200000 l f
|
|
||||||
0.100000 slw
|
|
||||||
[] 0 sd
|
|
||||||
[] 0 sd
|
|
||||||
0 slj
|
|
||||||
0.000000 0.000000 0.000000 srgb
|
|
||||||
n 8.900000 6.200000 m 8.900000 7.495000 l 12.500000 7.495000 l 12.500000 6.200000 l cp s
|
|
||||||
1.000000 1.000000 1.000000 srgb
|
|
||||||
n 13.090000 6.195000 m 13.090000 7.495000 l 16.400000 7.495000 l 16.400000 6.195000 l f
|
|
||||||
0.100000 slw
|
|
||||||
[] 0 sd
|
|
||||||
[] 0 sd
|
|
||||||
0 slj
|
|
||||||
0.000000 0.000000 0.000000 srgb
|
|
||||||
n 13.090000 6.195000 m 13.090000 7.495000 l 16.400000 7.495000 l 16.400000 6.195000 l cp s
|
|
||||||
gsave 5.400000 7.100000 translate 0.035278 -0.035278 scale
|
|
||||||
start_ol
|
|
||||||
1536 2838 moveto
|
|
||||||
935 1180 lineto
|
|
||||||
2140 1180 lineto
|
|
||||||
1536 2838 lineto
|
|
||||||
1286 3282 moveto
|
|
||||||
1789 3282 lineto
|
|
||||||
3038 0 lineto
|
|
||||||
2577 0 lineto
|
|
||||||
2278 832 lineto
|
|
||||||
801 832 lineto
|
|
||||||
503 0 lineto
|
|
||||||
35 0 lineto
|
|
||||||
1286 3282 lineto
|
|
||||||
end_ol grestore
|
|
||||||
gsave 5.795817 7.100000 translate 0.035278 -0.035278 scale
|
|
||||||
start_ol
|
|
||||||
2048 2116 moveto
|
|
||||||
2048 3456 lineto
|
|
||||||
2474 3456 lineto
|
|
||||||
2474 0 lineto
|
|
||||||
2048 0 lineto
|
|
||||||
2048 380 lineto
|
|
||||||
1922 154 1727 45 conicto
|
|
||||||
1533 -64 1261 -64 conicto
|
|
||||||
816 -64 536 297 conicto
|
|
||||||
256 659 256 1248 conicto
|
|
||||||
256 1837 536 2198 conicto
|
|
||||||
816 2560 1260 2560 conicto
|
|
||||||
1532 2560 1726 2450 conicto
|
|
||||||
1921 2341 2048 2116 conicto
|
|
||||||
682 1248 moveto
|
|
||||||
682 798 864 541 conicto
|
|
||||||
1046 284 1364 284 conicto
|
|
||||||
1683 284 1865 541 conicto
|
|
||||||
2048 798 2048 1248 conicto
|
|
||||||
2048 1699 1865 1955 conicto
|
|
||||||
1683 2212 1364 2212 conicto
|
|
||||||
1046 2212 864 1955 conicto
|
|
||||||
682 1699 682 1248 conicto
|
|
||||||
end_ol grestore
|
|
||||||
gsave 6.176817 7.100000 translate 0.035278 -0.035278 scale
|
|
||||||
start_ol
|
|
||||||
2048 2116 moveto
|
|
||||||
2048 3456 lineto
|
|
||||||
2474 3456 lineto
|
|
||||||
2474 0 lineto
|
|
||||||
2048 0 lineto
|
|
||||||
2048 380 lineto
|
|
||||||
1922 154 1727 45 conicto
|
|
||||||
1533 -64 1261 -64 conicto
|
|
||||||
816 -64 536 297 conicto
|
|
||||||
256 659 256 1248 conicto
|
|
||||||
256 1837 536 2198 conicto
|
|
||||||
816 2560 1260 2560 conicto
|
|
||||||
1532 2560 1726 2450 conicto
|
|
||||||
1921 2341 2048 2116 conicto
|
|
||||||
682 1248 moveto
|
|
||||||
682 798 864 541 conicto
|
|
||||||
1046 284 1364 284 conicto
|
|
||||||
1683 284 1865 541 conicto
|
|
||||||
2048 798 2048 1248 conicto
|
|
||||||
2048 1699 1865 1955 conicto
|
|
||||||
1683 2212 1364 2212 conicto
|
|
||||||
1046 2212 864 1955 conicto
|
|
||||||
682 1699 682 1248 conicto
|
|
||||||
end_ol grestore
|
|
||||||
gsave 6.557817 7.100000 translate 0.035278 -0.035278 scale
|
|
||||||
start_ol
|
|
||||||
1842 2133 moveto
|
|
||||||
1776 2174 1696 2193 conicto
|
|
||||||
1616 2212 1519 2212 conicto
|
|
||||||
1177 2212 993 1983 conicto
|
|
||||||
810 1755 810 1328 conicto
|
|
||||||
810 0 lineto
|
|
||||||
384 0 lineto
|
|
||||||
384 2496 lineto
|
|
||||||
810 2496 lineto
|
|
||||||
810 2129 lineto
|
|
||||||
937 2347 1141 2453 conicto
|
|
||||||
1345 2560 1638 2560 conicto
|
|
||||||
1680 2560 1730 2554 conicto
|
|
||||||
1781 2548 1842 2536 conicto
|
|
||||||
1842 2133 lineto
|
|
||||||
end_ol grestore
|
|
||||||
gsave 6.790121 7.100000 translate 0.035278 -0.035278 scale
|
|
||||||
start_ol
|
|
||||||
2538 1329 moveto
|
|
||||||
2538 1124 lineto
|
|
||||||
682 1124 lineto
|
|
||||||
682 714 908 499 conicto
|
|
||||||
1134 284 1537 284 conicto
|
|
||||||
1772 284 1991 340 conicto
|
|
||||||
2211 396 2432 509 conicto
|
|
||||||
2432 128 lineto
|
|
||||||
2216 34 1988 -15 conicto
|
|
||||||
1760 -64 1526 -64 conicto
|
|
||||||
940 -64 598 284 conicto
|
|
||||||
256 633 256 1226 conicto
|
|
||||||
256 1839 582 2199 conicto
|
|
||||||
909 2560 1463 2560 conicto
|
|
||||||
1960 2560 2249 2229 conicto
|
|
||||||
2538 1898 2538 1329 conicto
|
|
||||||
2112 1472 moveto
|
|
||||||
2112 1809 1931 2010 conicto
|
|
||||||
1751 2212 1453 2212 conicto
|
|
||||||
1116 2212 914 2018 conicto
|
|
||||||
712 1824 682 1472 conicto
|
|
||||||
2112 1472 lineto
|
|
||||||
end_ol grestore
|
|
||||||
gsave 7.154187 7.100000 translate 0.035278 -0.035278 scale
|
|
||||||
start_ol
|
|
||||||
2021 2424 moveto
|
|
||||||
2021 2034 lineto
|
|
||||||
1818 2123 1638 2167 conicto
|
|
||||||
1459 2212 1267 2212 conicto
|
|
||||||
975 2212 828 2119 conicto
|
|
||||||
682 2026 682 1838 conicto
|
|
||||||
682 1696 784 1615 conicto
|
|
||||||
887 1535 1196 1461 conicto
|
|
||||||
1327 1430 lineto
|
|
||||||
1748 1337 1930 1166 conicto
|
|
||||||
2112 995 2112 690 conicto
|
|
||||||
2112 342 1839 139 conicto
|
|
||||||
1566 -64 1089 -64 conicto
|
|
||||||
891 -64 675 -25 conicto
|
|
||||||
460 14 222 94 conicto
|
|
||||||
222 519 lineto
|
|
||||||
481 402 692 343 conicto
|
|
||||||
903 284 1110 284 conicto
|
|
||||||
1387 284 1536 383 conicto
|
|
||||||
1686 482 1686 661 conicto
|
|
||||||
1686 829 1580 917 conicto
|
|
||||||
1475 1006 1118 1088 conicto
|
|
||||||
985 1121 lineto
|
|
||||||
620 1201 438 1367 conicto
|
|
||||||
256 1533 256 1823 conicto
|
|
||||||
256 2176 507 2368 conicto
|
|
||||||
758 2560 1219 2560 conicto
|
|
||||||
1448 2560 1649 2526 conicto
|
|
||||||
1851 2492 2021 2424 conicto
|
|
||||||
end_ol grestore
|
|
||||||
gsave 7.458988 7.100000 translate 0.035278 -0.035278 scale
|
|
||||||
start_ol
|
|
||||||
2021 2424 moveto
|
|
||||||
2021 2034 lineto
|
|
||||||
1818 2123 1638 2167 conicto
|
|
||||||
1459 2212 1267 2212 conicto
|
|
||||||
975 2212 828 2119 conicto
|
|
||||||
682 2026 682 1838 conicto
|
|
||||||
682 1696 784 1615 conicto
|
|
||||||
887 1535 1196 1461 conicto
|
|
||||||
1327 1430 lineto
|
|
||||||
1748 1337 1930 1166 conicto
|
|
||||||
2112 995 2112 690 conicto
|
|
||||||
2112 342 1839 139 conicto
|
|
||||||
1566 -64 1089 -64 conicto
|
|
||||||
891 -64 675 -25 conicto
|
|
||||||
460 14 222 94 conicto
|
|
||||||
222 519 lineto
|
|
||||||
481 402 692 343 conicto
|
|
||||||
903 284 1110 284 conicto
|
|
||||||
1387 284 1536 383 conicto
|
|
||||||
1686 482 1686 661 conicto
|
|
||||||
1686 829 1580 917 conicto
|
|
||||||
1475 1006 1118 1088 conicto
|
|
||||||
985 1121 lineto
|
|
||||||
620 1201 438 1367 conicto
|
|
||||||
256 1533 256 1823 conicto
|
|
||||||
256 2176 507 2368 conicto
|
|
||||||
758 2560 1219 2560 conicto
|
|
||||||
1448 2560 1649 2526 conicto
|
|
||||||
1851 2492 2021 2424 conicto
|
|
||||||
end_ol grestore
|
|
||||||
gsave 9.020000 7.095000 translate 0.035278 -0.035278 scale
|
|
||||||
start_ol
|
|
||||||
2880 3094 moveto
|
|
||||||
2880 2615 lineto
|
|
||||||
2656 2831 2402 2937 conicto
|
|
||||||
2149 3044 1864 3044 conicto
|
|
||||||
1301 3044 1002 2689 conicto
|
|
||||||
704 2334 704 1663 conicto
|
|
||||||
704 993 1002 638 conicto
|
|
||||||
1301 284 1864 284 conicto
|
|
||||||
2149 284 2402 390 conicto
|
|
||||||
2656 497 2880 713 conicto
|
|
||||||
2880 238 lineto
|
|
||||||
2649 87 2390 11 conicto
|
|
||||||
2132 -64 1845 -64 conicto
|
|
||||||
1106 -64 681 399 conicto
|
|
||||||
256 863 256 1664 conicto
|
|
||||||
256 2466 681 2929 conicto
|
|
||||||
1106 3392 1845 3392 conicto
|
|
||||||
2137 3392 2395 3317 conicto
|
|
||||||
2654 3243 2880 3094 conicto
|
|
||||||
end_ol grestore
|
|
||||||
gsave 9.434867 7.095000 translate 0.035278 -0.035278 scale
|
|
||||||
start_ol
|
|
||||||
1377 2212 moveto
|
|
||||||
1055 2212 868 1954 conicto
|
|
||||||
682 1696 682 1248 conicto
|
|
||||||
682 800 867 542 conicto
|
|
||||||
1053 284 1377 284 conicto
|
|
||||||
1697 284 1883 543 conicto
|
|
||||||
2070 802 2070 1248 conicto
|
|
||||||
2070 1692 1883 1952 conicto
|
|
||||||
1697 2212 1377 2212 conicto
|
|
||||||
1376 2560 moveto
|
|
||||||
1899 2560 2197 2212 conicto
|
|
||||||
2496 1864 2496 1248 conicto
|
|
||||||
2496 635 2197 285 conicto
|
|
||||||
1899 -64 1376 -64 conicto
|
|
||||||
851 -64 553 285 conicto
|
|
||||||
256 635 256 1248 conicto
|
|
||||||
256 1864 553 2212 conicto
|
|
||||||
851 2560 1376 2560 conicto
|
|
||||||
end_ol grestore
|
|
||||||
gsave 9.798933 7.095000 translate 0.035278 -0.035278 scale
|
|
||||||
start_ol
|
|
||||||
2339 2028 moveto
|
|
||||||
2493 2302 2705 2431 conicto
|
|
||||||
2918 2560 3204 2560 conicto
|
|
||||||
3591 2560 3800 2286 conicto
|
|
||||||
4010 2013 4010 1509 conicto
|
|
||||||
4010 0 lineto
|
|
||||||
3584 0 lineto
|
|
||||||
3584 1502 lineto
|
|
||||||
3584 1862 3460 2037 conicto
|
|
||||||
3336 2212 3082 2212 conicto
|
|
||||||
2771 2212 2590 1999 conicto
|
|
||||||
2410 1786 2410 1419 conicto
|
|
||||||
2410 0 lineto
|
|
||||||
1984 0 lineto
|
|
||||||
1984 1502 lineto
|
|
||||||
1984 1865 1860 2038 conicto
|
|
||||||
1736 2212 1477 2212 conicto
|
|
||||||
1171 2212 990 1998 conicto
|
|
||||||
810 1784 810 1419 conicto
|
|
||||||
810 0 lineto
|
|
||||||
384 0 lineto
|
|
||||||
384 2496 lineto
|
|
||||||
810 2496 lineto
|
|
||||||
810 2120 lineto
|
|
||||||
947 2344 1141 2452 conicto
|
|
||||||
1335 2560 1602 2560 conicto
|
|
||||||
1871 2560 2060 2423 conicto
|
|
||||||
2249 2287 2339 2028 conicto
|
|
||||||
end_ol grestore
|
|
||||||
gsave 10.383133 7.095000 translate 0.035278 -0.035278 scale
|
|
||||||
start_ol
|
|
||||||
810 380 moveto
|
|
||||||
810 -960 lineto
|
|
||||||
384 -960 lineto
|
|
||||||
384 2496 lineto
|
|
||||||
810 2496 lineto
|
|
||||||
810 2116 lineto
|
|
||||||
937 2339 1131 2449 conicto
|
|
||||||
1325 2560 1595 2560 conicto
|
|
||||||
2042 2560 2322 2198 conicto
|
|
||||||
2602 1837 2602 1248 conicto
|
|
||||||
2602 659 2322 297 conicto
|
|
||||||
2043 -64 1595 -64 conicto
|
|
||||||
1325 -64 1131 45 conicto
|
|
||||||
938 155 810 380 conicto
|
|
||||||
2176 1248 moveto
|
|
||||||
2176 1699 1994 1955 conicto
|
|
||||||
1812 2212 1493 2212 conicto
|
|
||||||
1175 2212 992 1955 conicto
|
|
||||||
810 1699 810 1248 conicto
|
|
||||||
810 798 992 541 conicto
|
|
||||||
1175 284 1493 284 conicto
|
|
||||||
1812 284 1994 541 conicto
|
|
||||||
2176 798 2176 1248 conicto
|
|
||||||
end_ol grestore
|
|
||||||
gsave 10.755667 7.095000 translate 0.035278 -0.035278 scale
|
|
||||||
start_ol
|
|
||||||
1377 2212 moveto
|
|
||||||
1055 2212 868 1954 conicto
|
|
||||||
682 1696 682 1248 conicto
|
|
||||||
682 800 867 542 conicto
|
|
||||||
1053 284 1377 284 conicto
|
|
||||||
1697 284 1883 543 conicto
|
|
||||||
2070 802 2070 1248 conicto
|
|
||||||
2070 1692 1883 1952 conicto
|
|
||||||
1697 2212 1377 2212 conicto
|
|
||||||
1376 2560 moveto
|
|
||||||
1899 2560 2197 2212 conicto
|
|
||||||
2496 1864 2496 1248 conicto
|
|
||||||
2496 635 2197 285 conicto
|
|
||||||
1899 -64 1376 -64 conicto
|
|
||||||
851 -64 553 285 conicto
|
|
||||||
256 635 256 1248 conicto
|
|
||||||
256 1864 553 2212 conicto
|
|
||||||
851 2560 1376 2560 conicto
|
|
||||||
end_ol grestore
|
|
||||||
gsave 11.119733 7.095000 translate 0.035278 -0.035278 scale
|
|
||||||
start_ol
|
|
||||||
2474 1509 moveto
|
|
||||||
2474 0 lineto
|
|
||||||
2048 0 lineto
|
|
||||||
2048 1502 lineto
|
|
||||||
2048 1858 1913 2035 conicto
|
|
||||||
1778 2212 1509 2212 conicto
|
|
||||||
1185 2212 997 1999 conicto
|
|
||||||
810 1786 810 1419 conicto
|
|
||||||
810 0 lineto
|
|
||||||
384 0 lineto
|
|
||||||
384 2496 lineto
|
|
||||||
810 2496 lineto
|
|
||||||
810 2120 lineto
|
|
||||||
954 2340 1152 2450 conicto
|
|
||||||
1350 2560 1609 2560 conicto
|
|
||||||
2037 2560 2255 2293 conicto
|
|
||||||
2474 2027 2474 1509 conicto
|
|
||||||
end_ol grestore
|
|
||||||
gsave 11.500733 7.095000 translate 0.035278 -0.035278 scale
|
|
||||||
start_ol
|
|
||||||
2538 1329 moveto
|
|
||||||
2538 1124 lineto
|
|
||||||
682 1124 lineto
|
|
||||||
682 714 908 499 conicto
|
|
||||||
1134 284 1537 284 conicto
|
|
||||||
1772 284 1991 340 conicto
|
|
||||||
2211 396 2432 509 conicto
|
|
||||||
2432 128 lineto
|
|
||||||
2216 34 1988 -15 conicto
|
|
||||||
1760 -64 1526 -64 conicto
|
|
||||||
940 -64 598 284 conicto
|
|
||||||
256 633 256 1226 conicto
|
|
||||||
256 1839 582 2199 conicto
|
|
||||||
909 2560 1463 2560 conicto
|
|
||||||
1960 2560 2249 2229 conicto
|
|
||||||
2538 1898 2538 1329 conicto
|
|
||||||
2112 1472 moveto
|
|
||||||
2112 1809 1931 2010 conicto
|
|
||||||
1751 2212 1453 2212 conicto
|
|
||||||
1116 2212 914 2018 conicto
|
|
||||||
712 1824 682 1472 conicto
|
|
||||||
2112 1472 lineto
|
|
||||||
end_ol grestore
|
|
||||||
gsave 11.864800 7.095000 translate 0.035278 -0.035278 scale
|
|
||||||
start_ol
|
|
||||||
2474 1509 moveto
|
|
||||||
2474 0 lineto
|
|
||||||
2048 0 lineto
|
|
||||||
2048 1502 lineto
|
|
||||||
2048 1858 1913 2035 conicto
|
|
||||||
1778 2212 1509 2212 conicto
|
|
||||||
1185 2212 997 1999 conicto
|
|
||||||
810 1786 810 1419 conicto
|
|
||||||
810 0 lineto
|
|
||||||
384 0 lineto
|
|
||||||
384 2496 lineto
|
|
||||||
810 2496 lineto
|
|
||||||
810 2120 lineto
|
|
||||||
954 2340 1152 2450 conicto
|
|
||||||
1350 2560 1609 2560 conicto
|
|
||||||
2037 2560 2255 2293 conicto
|
|
||||||
2474 2027 2474 1509 conicto
|
|
||||||
end_ol grestore
|
|
||||||
gsave 12.245800 7.095000 translate 0.035278 -0.035278 scale
|
|
||||||
start_ol
|
|
||||||
832 3213 moveto
|
|
||||||
832 2524 lineto
|
|
||||||
1664 2524 lineto
|
|
||||||
1664 2176 lineto
|
|
||||||
832 2176 lineto
|
|
||||||
832 826 lineto
|
|
||||||
832 521 914 434 conicto
|
|
||||||
997 348 1249 348 conicto
|
|
||||||
1664 348 lineto
|
|
||||||
1664 0 lineto
|
|
||||||
1242 0 lineto
|
|
||||||
768 0 587 179 conicto
|
|
||||||
406 359 406 826 conicto
|
|
||||||
406 2176 lineto
|
|
||||||
128 2176 lineto
|
|
||||||
128 2524 lineto
|
|
||||||
406 2524 lineto
|
|
||||||
406 3213 lineto
|
|
||||||
832 3213 lineto
|
|
||||||
end_ol grestore
|
|
||||||
gsave 13.945000 6.995000 translate 0.035278 -0.035278 scale
|
|
||||||
start_ol
|
|
||||||
448 3328 moveto
|
|
||||||
2313 3328 lineto
|
|
||||||
2313 2980 lineto
|
|
||||||
874 2980 lineto
|
|
||||||
874 1948 lineto
|
|
||||||
2173 1948 lineto
|
|
||||||
2173 1600 lineto
|
|
||||||
874 1600 lineto
|
|
||||||
874 27 lineto
|
|
||||||
448 27 lineto
|
|
||||||
448 3328 lineto
|
|
||||||
end_ol grestore
|
|
||||||
gsave 14.239614 6.995000 translate 0.035278 -0.035278 scale
|
|
||||||
start_ol
|
|
||||||
1842 2133 moveto
|
|
||||||
1776 2174 1696 2193 conicto
|
|
||||||
1616 2212 1519 2212 conicto
|
|
||||||
1177 2212 993 1983 conicto
|
|
||||||
810 1755 810 1328 conicto
|
|
||||||
810 0 lineto
|
|
||||||
384 0 lineto
|
|
||||||
384 2496 lineto
|
|
||||||
810 2496 lineto
|
|
||||||
810 2129 lineto
|
|
||||||
937 2347 1141 2453 conicto
|
|
||||||
1345 2560 1638 2560 conicto
|
|
||||||
1680 2560 1730 2554 conicto
|
|
||||||
1781 2548 1842 2536 conicto
|
|
||||||
1842 2133 lineto
|
|
||||||
end_ol grestore
|
|
||||||
gsave 14.485147 6.995000 translate 0.035278 -0.035278 scale
|
|
||||||
start_ol
|
|
||||||
1528 1252 moveto
|
|
||||||
1050 1252 866 1139 conicto
|
|
||||||
682 1026 682 754 conicto
|
|
||||||
682 538 820 411 conicto
|
|
||||||
958 284 1196 284 conicto
|
|
||||||
1523 284 1721 523 conicto
|
|
||||||
1920 763 1920 1161 conicto
|
|
||||||
1920 1252 lineto
|
|
||||||
1528 1252 lineto
|
|
||||||
2346 1426 moveto
|
|
||||||
2346 0 lineto
|
|
||||||
1920 0 lineto
|
|
||||||
1920 383 lineto
|
|
||||||
1785 154 1579 45 conicto
|
|
||||||
1374 -64 1076 -64 conicto
|
|
||||||
701 -64 478 154 conicto
|
|
||||||
256 373 256 739 conicto
|
|
||||||
256 1166 543 1383 conicto
|
|
||||||
830 1600 1367 1600 conicto
|
|
||||||
1920 1600 lineto
|
|
||||||
1920 1639 lineto
|
|
||||||
1920 1913 1740 2062 conicto
|
|
||||||
1561 2212 1238 2212 conicto
|
|
||||||
1032 2212 836 2162 conicto
|
|
||||||
641 2113 448 2014 conicto
|
|
||||||
448 2386 lineto
|
|
||||||
670 2473 879 2516 conicto
|
|
||||||
1088 2560 1285 2560 conicto
|
|
||||||
1819 2560 2082 2279 conicto
|
|
||||||
2346 1998 2346 1426 conicto
|
|
||||||
end_ol grestore
|
|
||||||
gsave 14.849214 6.995000 translate 0.035278 -0.035278 scale
|
|
||||||
start_ol
|
|
||||||
2339 2028 moveto
|
|
||||||
2493 2302 2705 2431 conicto
|
|
||||||
2918 2560 3204 2560 conicto
|
|
||||||
3591 2560 3800 2286 conicto
|
|
||||||
4010 2013 4010 1509 conicto
|
|
||||||
4010 0 lineto
|
|
||||||
3584 0 lineto
|
|
||||||
3584 1502 lineto
|
|
||||||
3584 1862 3460 2037 conicto
|
|
||||||
3336 2212 3082 2212 conicto
|
|
||||||
2771 2212 2590 1999 conicto
|
|
||||||
2410 1786 2410 1419 conicto
|
|
||||||
2410 0 lineto
|
|
||||||
1984 0 lineto
|
|
||||||
1984 1502 lineto
|
|
||||||
1984 1865 1860 2038 conicto
|
|
||||||
1736 2212 1477 2212 conicto
|
|
||||||
1171 2212 990 1998 conicto
|
|
||||||
810 1784 810 1419 conicto
|
|
||||||
810 0 lineto
|
|
||||||
384 0 lineto
|
|
||||||
384 2496 lineto
|
|
||||||
810 2496 lineto
|
|
||||||
810 2120 lineto
|
|
||||||
947 2344 1141 2452 conicto
|
|
||||||
1335 2560 1602 2560 conicto
|
|
||||||
1871 2560 2060 2423 conicto
|
|
||||||
2249 2287 2339 2028 conicto
|
|
||||||
end_ol grestore
|
|
||||||
gsave 15.433414 6.995000 translate 0.035278 -0.035278 scale
|
|
||||||
start_ol
|
|
||||||
2538 1329 moveto
|
|
||||||
2538 1124 lineto
|
|
||||||
682 1124 lineto
|
|
||||||
682 714 908 499 conicto
|
|
||||||
1134 284 1537 284 conicto
|
|
||||||
1772 284 1991 340 conicto
|
|
||||||
2211 396 2432 509 conicto
|
|
||||||
2432 128 lineto
|
|
||||||
2216 34 1988 -15 conicto
|
|
||||||
1760 -64 1526 -64 conicto
|
|
||||||
940 -64 598 284 conicto
|
|
||||||
256 633 256 1226 conicto
|
|
||||||
256 1839 582 2199 conicto
|
|
||||||
909 2560 1463 2560 conicto
|
|
||||||
1960 2560 2249 2229 conicto
|
|
||||||
2538 1898 2538 1329 conicto
|
|
||||||
2112 1472 moveto
|
|
||||||
2112 1809 1931 2010 conicto
|
|
||||||
1751 2212 1453 2212 conicto
|
|
||||||
1116 2212 914 2018 conicto
|
|
||||||
712 1824 682 1472 conicto
|
|
||||||
2112 1472 lineto
|
|
||||||
end_ol grestore
|
|
||||||
showpage
|
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 2.8 KiB |
@@ -1,112 +0,0 @@
|
|||||||
/*******************************************************************************
|
|
||||||
|
|
||||||
OPENAIRINTERFACE 0/1/2/3
|
|
||||||
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>
|
|
||||||
Mailing List <openair_tech@eurecom.fr>
|
|
||||||
Forums http://forums.eurecom.fr/openairinterface
|
|
||||||
Eurecom, 2229, route des cretes, 06560 Valbonne Sophia Antipolis, France
|
|
||||||
|
|
||||||
*******************************************************************************/
|
|
||||||
|
|
||||||
/*! \file Readme.doxy
|
|
||||||
* \brief explain how this block is organized, and how it works
|
|
||||||
* \author Navid Nikaein
|
|
||||||
* \date 2009
|
|
||||||
* \version 0.1
|
|
||||||
* \company Eurecom
|
|
||||||
* \note This conde is under GNU GENERAL PUBLIC LICENSE, version 2, June 1991
|
|
||||||
* \email: navid.nikaein@eurecom.fr
|
|
||||||
* \warning
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*! \mainpage Table of contents
|
|
||||||
|
|
||||||
The content of this readme is the following:
|
|
||||||
|
|
||||||
-# What is this block about in OpenAirInterface
|
|
||||||
-# Folders and files description
|
|
||||||
-# Organization of the folders and their dependancies
|
|
||||||
-# Makefile targets and how to build
|
|
||||||
-# How to use through a tutorial: run a simple experimentation
|
|
||||||
|
|
||||||
|
|
||||||
\section _block What is this block about in OpenAirInterface ?
|
|
||||||
|
|
||||||
|
|
||||||
It essentially means "the hardware part" located at openair0.
|
|
||||||
|
|
||||||
Explain through the figures:
|
|
||||||
\image html image.png "caption" width=3cm
|
|
||||||
\image latex image.pdf "caption"
|
|
||||||
|
|
||||||
More information about ??? can be found on the Twiki:
|
|
||||||
https://twiki.eurecom.fr/twiki/bin/view/OpenAirInterface/WebHome
|
|
||||||
|
|
||||||
|
|
||||||
\section _folders Folders and files description
|
|
||||||
|
|
||||||
The structure is the following:
|
|
||||||
<table>
|
|
||||||
<tr><td>File/Folder</td> <td> Description </td> </tr>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
- Folder1: Contains this and that
|
|
||||||
- Folder2: Contains this and that
|
|
||||||
- init.bash: A simple script file, that any user SHOULD source from its environment personal set-up script (this is typically ~/.bashrc) by adding the following lines to it:
|
|
||||||
This is my ~/.bashrc file or equivalent export OPENAIRX=path/to/my/openairX/folder source $OPENAIRX/init.bash. The file includes variable definitions & path settings to access softwares, sources & Makefiles, software distribution in openair, and so on.
|
|
||||||
|
|
||||||
|
|
||||||
YOU DEFINETELY NEED TO SOURCE THIS FILE. Description
|
|
||||||
|
|
||||||
\section _organization Organization of the folders and their dependancies
|
|
||||||
|
|
||||||
|
|
||||||
The 3 folders have the following structures
|
|
||||||
|
|
||||||
- Folder1/subfolder1/: contains any ressource related to the design
|
|
||||||
|
|
||||||
- Folder2/subfolder2/: contains
|
|
||||||
|
|
||||||
- Folder2/src/
|
|
||||||
|
|
||||||
- Folder2/lib/
|
|
||||||
|
|
||||||
- Folder2/bin/
|
|
||||||
|
|
||||||
Explain where are the source files.
|
|
||||||
Explain the relationship with other Blocks.
|
|
||||||
|
|
||||||
|
|
||||||
\section _makefile Makefile targets and how to build
|
|
||||||
|
|
||||||
Explain whether you are using symbolic links or not,
|
|
||||||
how to backup/archive
|
|
||||||
how to generate the tags
|
|
||||||
how to print the vars
|
|
||||||
how to create the documentation
|
|
||||||
|
|
||||||
\section _howto How to use through a tutorial: run a simple experimentation
|
|
||||||
...
|
|
||||||
|
|
||||||
|
|
||||||
*/
|
|
||||||
|
|
||||||
@@ -1,120 +0,0 @@
|
|||||||
/*******************************************************************************
|
|
||||||
|
|
||||||
OPENAIRINTERFACE 0/1/2/3
|
|
||||||
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>
|
|
||||||
Mailing List <openair_tech@eurecom.fr>
|
|
||||||
Forums http://forums.eurecom.fr/openairinterface
|
|
||||||
Eurecom, 2229, route des cretes, 06560 Valbonne Sophia Antipolis, France
|
|
||||||
|
|
||||||
*******************************************************************************/
|
|
||||||
/*________________________OEPNAIR/OPENAIR0/________________________
|
|
||||||
|
|
||||||
File : Readme.txt
|
|
||||||
Authors : navid nikaein
|
|
||||||
Company : EURECOM
|
|
||||||
Emails : navid.nikaein@eurecom.fr
|
|
||||||
________________________________________________________________*/
|
|
||||||
|
|
||||||
|
|
||||||
-------------------------
|
|
||||||
Table of contents
|
|
||||||
-------------------------
|
|
||||||
|
|
||||||
The content of this readme is the following:
|
|
||||||
|
|
||||||
1) What is this block about in OpenAirInterface
|
|
||||||
2) Folders and files description
|
|
||||||
3) Organization of the folders and their dependancies
|
|
||||||
4) Makefile targets and how to build
|
|
||||||
5) How to use through a tutorial: run a simple experimentation
|
|
||||||
|
|
||||||
------------------------------------------------
|
|
||||||
1) What is this block about in OpenAirInterface ?
|
|
||||||
-----------------------------------------------
|
|
||||||
|
|
||||||
|
|
||||||
It essentially means "the hardware part" located at openair0.
|
|
||||||
|
|
||||||
More information about ??? can be found on the Twiki:
|
|
||||||
https://twiki.eurecom.fr/twiki/bin/view/OpenAirInterface/WebHome
|
|
||||||
|
|
||||||
-----------------------------------------
|
|
||||||
2) Folders and files description
|
|
||||||
-----------------------------------------
|
|
||||||
|
|
||||||
File/Folder Description
|
|
||||||
----------- -----------
|
|
||||||
|
|
||||||
- Folder1/ contains
|
|
||||||
|
|
||||||
- Folder2/ contains
|
|
||||||
|
|
||||||
- init.bash A simple script file, that any user SHOULD source from
|
|
||||||
its environment personal set-up script (this is typically ~/.bashrc)
|
|
||||||
by adding the following lines to it:
|
|
||||||
|
|
||||||
# This is my ~/.bashrc file or equivalent
|
|
||||||
export OPENAIRX=path/to/my/openairX/folder
|
|
||||||
source $OPENAIRX/init.bash
|
|
||||||
|
|
||||||
The file includes variable definitions & path settings to
|
|
||||||
access softwares, sources & Makefiles, software
|
|
||||||
distribution in openair, and so on.
|
|
||||||
|
|
||||||
YOU DEFINETELY NEED TO SOURCE THIS FILE.
|
|
||||||
|
|
||||||
----------------------------------------------------
|
|
||||||
3) Organization of the folders and their dependancies
|
|
||||||
----------------------------------------------------
|
|
||||||
|
|
||||||
The 3 folders have the following structures
|
|
||||||
|
|
||||||
- Folder1/subfolder1/ contains any ressource related to the design
|
|
||||||
|
|
||||||
- Folder2/subfolder2/ contains
|
|
||||||
|
|
||||||
- Folder2/src/
|
|
||||||
|
|
||||||
- Folder2/lib/
|
|
||||||
|
|
||||||
- Folder2/bin/
|
|
||||||
|
|
||||||
Explain where are the source files.
|
|
||||||
Explain the relationship with other Blocks.
|
|
||||||
|
|
||||||
|
|
||||||
-----------------------------------------
|
|
||||||
4) Makefile targets and how to build
|
|
||||||
-----------------------------------------
|
|
||||||
|
|
||||||
Explain whether you are using symbolic links or not,
|
|
||||||
how to backup/archive
|
|
||||||
how to generate the tags
|
|
||||||
how to print the vars
|
|
||||||
how to create the documentation
|
|
||||||
|
|
||||||
----------------------------------------------------------------
|
|
||||||
6) How to use through a tutorial: run a simple experimentation
|
|
||||||
----------------------------------------------------------------
|
|
||||||
|
|
||||||
...
|
|
||||||
|
|
||||||
@@ -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>.
|
|
||||||
@@ -1,220 +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
|
|
||||||
|
|
||||||
*******************************************************************************/
|
|
||||||
|
|
||||||
/** @addtogroup _mesh_layer3_
|
|
||||||
* @{ This page describes the interface between the RRC and RRM/RRCI modules for OpenAirInterface Mesh.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
#ifndef __L3_RRC_DEFS_H__
|
|
||||||
#define __L3_RRC_DEFS_H__
|
|
||||||
|
|
||||||
#define MAX_L3_INFO 16
|
|
||||||
#define LENGTH_L2_ID 8
|
|
||||||
#define IEEE_ADDR_LEN 6
|
|
||||||
|
|
||||||
|
|
||||||
#include "COMMON/mac_rrc_primitives.h"
|
|
||||||
|
|
||||||
/*! \brief SENDORA scenario active: flags to set at the beginning of the simulation
|
|
||||||
*/
|
|
||||||
#define WSN 1 ///if wsn = 0 -> secondary network, else sensor network
|
|
||||||
#define SCEN_1 1
|
|
||||||
#define SCEN_2_CENTR 0
|
|
||||||
#define SCEN_2_DISTR 0
|
|
||||||
#define COLL_CLUST 0 //mod_lor_10_11_04
|
|
||||||
|
|
||||||
//mod_lor_10_05_05++
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief Id of different CRRM entities in case of multiple entities on same machine
|
|
||||||
*/
|
|
||||||
#define BTS_ID -1
|
|
||||||
#define FC_ID -1
|
|
||||||
#define CH_COLL_ID -1
|
|
||||||
#define FIRST_SENSOR_ID 0
|
|
||||||
#define FIRST_SECOND_CLUSTER_USER_ID 5 //add_lor_11_01_06 AAA: if two clusters on two pcs this parameter should be greater than the number of rrm instances
|
|
||||||
#define FIRST_MR_ID 8 //mod_lor_11_02_18: if cluster on more than 1 pc, this is the ID of first MR
|
|
||||||
//mod_lor_10_05_05--
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief Parameters about channels:
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
#define NB_OF_SENSORS 3 //!< Number of units that can perform sensing (if scen2_centr it includes secondary users of both clusters)
|
|
||||||
#define CH_NEEDED_FOR_SN 1 //!< Number of channels needed by secondary network//mod_lor_10_05_17
|
|
||||||
#define SB_NEEDED_FOR_SN 25 //mod_lor_10_05_26:
|
|
||||||
#define NB_SENS_MAX 4 //!< Maximum number of channels accepted by the system; AAA: should be low (4) in SCEN_2 otherwise overflow at rrc level
|
|
||||||
#define MAX_NUM_SB 50//mod_eure_lor
|
|
||||||
#define SB_BANDWIDTH 180 //! in khz, bandwidth of each sub-band; AAA -> modify only in relation with NUM_SB and sensing parameters in emul_interface! //mod_lor_10_05_26
|
|
||||||
#define NUM_SB 50//mod_eure_lor
|
|
||||||
#define LAMBDA0 -90 //mod_lor_10_05_26: for mu0 that is the averaged value
|
|
||||||
#define LAMBDA1 -75 //mod_lor_10_05_26: for mu1 that is the maximum value
|
|
||||||
#define MIN_NB_SB_CH 25 //mod_lor_10_05_26: for mu1 that is the maximum value
|
|
||||||
#define BG 8 //! sub-bands of protection between channels
|
|
||||||
#define MAX_USER_NB 5 //! max number of users //add_lor_10_11_03
|
|
||||||
|
|
||||||
/*! \brief Transaction ID descriptor
|
|
||||||
*/
|
|
||||||
typedef unsigned int Transaction_t;
|
|
||||||
|
|
||||||
/*! \brief Instance ID descriptor
|
|
||||||
*/
|
|
||||||
typedef unsigned char Instance_t;
|
|
||||||
|
|
||||||
/*!\brief Radio Bearer ID descriptor
|
|
||||||
*/
|
|
||||||
typedef unsigned short RB_ID;
|
|
||||||
|
|
||||||
|
|
||||||
typedef unsigned short QOS_CLASS_T;
|
|
||||||
|
|
||||||
#define LCHAN_BCCH 0
|
|
||||||
#define LCHAN_CCCH 1
|
|
||||||
#define LCHAN_DCCH 2
|
|
||||||
#define LCHAN_DTCH_B 3
|
|
||||||
#define LCHAN_DTCH 4
|
|
||||||
#define LCHAN_MRBCH 5
|
|
||||||
|
|
||||||
/*!\brief Layer 2 Identifier
|
|
||||||
*/
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
unsigned char L2_id[LENGTH_L2_ID];
|
|
||||||
} L2_ID;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*!\brief Measurement Mode
|
|
||||||
*/
|
|
||||||
typedef enum {
|
|
||||||
PERIODIC=0, /*!< Periodic measurement*/
|
|
||||||
EVENT_DRIVEN /*!< Event-driven measurement*/
|
|
||||||
} MEAS_MODE;
|
|
||||||
|
|
||||||
/*!\brief Sensing measurement descriptor
|
|
||||||
*/
|
|
||||||
typedef struct {
|
|
||||||
unsigned char RSSI_Threshold; /*!< Threshold (minus in dBm) for neighbour RSSI measurement*/
|
|
||||||
unsigned char RSSI_F_Factor; /*!< Forgetting factor for RSSI averaging*/
|
|
||||||
unsigned short Rep_interval; /*!< \brief Reporting interval between successive measurement reports in this process*/
|
|
||||||
} SENSING_MEAS_DESC;
|
|
||||||
|
|
||||||
/*!\brief Sensing measurement information
|
|
||||||
*/
|
|
||||||
typedef struct {
|
|
||||||
unsigned char Rssi; /*!< RSSI (minus in dBm) for neighbour*/
|
|
||||||
L2_ID L2_id; /*!< Layer 2 ID for neighbour*/
|
|
||||||
} SENSING_MEAS_T;
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief Structure of sensing information database
|
|
||||||
*/
|
|
||||||
typedef struct Sens_ch_s {
|
|
||||||
unsigned int Start_f ; ///< frequence initial du canal //mod_lor_10_03_17: intxflot
|
|
||||||
unsigned int Final_f ; ///< frequence final du canal //mod_lor_10_03_17: intxflot
|
|
||||||
unsigned int Ch_id ; ///< ID du canal
|
|
||||||
//mod_eure_lor++
|
|
||||||
char I0[MAX_NUM_SB] ;
|
|
||||||
char mu0[MAX_NUM_SB];
|
|
||||||
char mu1[MAX_NUM_SB];
|
|
||||||
|
|
||||||
//float meas ; ///< Sensing results
|
|
||||||
unsigned int is_free [MAX_NUM_SB] ; ///< Decision about the channel //mod_lor_10_05_28 ->char instead of int
|
|
||||||
//mod_eure_lor--
|
|
||||||
struct Sens_ch_s *next ; ///< pointeur sur le prochain canal
|
|
||||||
} Sens_ch_t ;
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief Structure that describes the channels
|
|
||||||
*/
|
|
||||||
typedef struct {
|
|
||||||
unsigned int Start_f ; ///< frequence initial du canal //mod_lor_10_03_17: intxflot
|
|
||||||
unsigned int Final_f ; ///< frequence final du canal //mod_lor_10_03_17: intxflot
|
|
||||||
unsigned int Ch_id ; ///< ID du canal //mod_lor_10_03_17: intxflot
|
|
||||||
QOS_CLASS_T QoS ; ///< Max QoS possible on the channel
|
|
||||||
} CHANNEL_T ;
|
|
||||||
|
|
||||||
/*!\brief cooperation type between CHs
|
|
||||||
*/
|
|
||||||
typedef enum {
|
|
||||||
NO_COOP = 0, //!< No cooperation
|
|
||||||
AMPL_FORW = 1, //!< amplify and forward collaboration
|
|
||||||
DECO_FORW = 2, //!< decode and forward collaboration
|
|
||||||
} COOPERATION_T;
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief Structure that describes the channels
|
|
||||||
*/
|
|
||||||
typedef struct {
|
|
||||||
//float Start_f ; ///< frequence initial du canal
|
|
||||||
//float Final_f ; ///< frequence final du canal
|
|
||||||
int Ch_id ; ///< ID du canal
|
|
||||||
//QOS_CLASS_T QoS ; ///< Max QoS possible on the channel
|
|
||||||
} MAC_INFO_T ;
|
|
||||||
|
|
||||||
|
|
||||||
/*!\brief Layer 3 Info types for RRC messages
|
|
||||||
*/
|
|
||||||
typedef enum {
|
|
||||||
NONE_L3 = 0, //!< No information
|
|
||||||
IPv4_ADDR = 4, //!< IPv4 Address = size Info
|
|
||||||
IPv6_ADDR =16, //!< IPv6 Address = size Info
|
|
||||||
MAC_ADDR = 8 //!< MAC Id = size Info
|
|
||||||
} L3_INFO_T;
|
|
||||||
|
|
||||||
/*!\brief Layer 3 Info types for RRC messages
|
|
||||||
*/
|
|
||||||
typedef enum {
|
|
||||||
BROADCAST=0, /*!< Broadcast bearer*/
|
|
||||||
UNICAST, /*!< Unicast bearer*/
|
|
||||||
MULTICAST /*!< Multicast bearer*/
|
|
||||||
} RB_TYPE;
|
|
||||||
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief Entete de la file des messages reçus ou a envoyer
|
|
||||||
*/
|
|
||||||
typedef struct channels_db_s {
|
|
||||||
double info_time ; ///< information age
|
|
||||||
unsigned int is_free ; ///< channel availability //mod_lor_10_05_28 ->char instead of int
|
|
||||||
unsigned int priority ; ///< channel priority
|
|
||||||
unsigned int is_ass ; ///< channel used by secondary network
|
|
||||||
L2_ID source_id ; ///< SU using channel (source)
|
|
||||||
L2_ID dest_id ; ///< SU using channel (dest)
|
|
||||||
CHANNEL_T channel ; ///< channel description
|
|
||||||
struct channels_db_s *next ; ///< next node pointer
|
|
||||||
} CHANNELS_DB_T ;
|
|
||||||
|
|
||||||
#endif //__L3_RRC_DEFS_H__
|
|
||||||
/** @} */
|
|
||||||
@@ -1,491 +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
|
|
||||||
|
|
||||||
*******************************************************************************/
|
|
||||||
|
|
||||||
/*! @defgroup _mesh_layer3_ OpenAirInterface MESH L2/L3 Interfaces
|
|
||||||
* @{
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*!
|
|
||||||
\brief Ask RRC to establish a radio bearer. Used mainly by CH, except during
|
|
||||||
initialization phase of MR for default bearers (SRB0,SRB1). Sends
|
|
||||||
CH IPAddr to RRC for attachment signaling (for example during DTCH_B
|
|
||||||
configuration).
|
|
||||||
*/
|
|
||||||
void rrm_rb_establish_req(
|
|
||||||
Instance_t inst , //!< Identification de l'instance
|
|
||||||
LCHAN_DESC *Lchan_desc , //!< Logical Channel Descriptor Array
|
|
||||||
MAC_RLC_MEAS_DESC *Mac_rlc_meas_desc, //!< MAC/RLC Measurement descriptors for RB
|
|
||||||
L2_ID *L2_id , //!< Layer 2 (MAC) IDs for link
|
|
||||||
Transaction_t Trans_id , //!< Transaction ID
|
|
||||||
unsigned char *L3_info , //!< Optional L3 Information
|
|
||||||
L3_INFO_T L3_info_t //!< Type of L3 Information
|
|
||||||
);
|
|
||||||
/*!
|
|
||||||
\brief RRC response to rb_establish_req. RRC Acknowledgement of reception of
|
|
||||||
rrc_rb_establishment_req.
|
|
||||||
*/
|
|
||||||
void rrc_rb_establish_resp(
|
|
||||||
Instance_t inst , //!< Identification de l'instance
|
|
||||||
Transaction_t Trans_id //!< Transaction ID
|
|
||||||
);
|
|
||||||
/*!
|
|
||||||
\brief RRC confirmation of rb_establish_req. RRC confirmation of
|
|
||||||
rrc_rb_establishment_req after transactions are complete. Essentially
|
|
||||||
for CH only (except SRB0/1)
|
|
||||||
*/
|
|
||||||
void rrc_rb_establish_cfm(
|
|
||||||
Instance_t inst , //!< Identification de l'instance
|
|
||||||
RB_ID Rb_id , //!< Radio Bearer ID used by RRC
|
|
||||||
RB_TYPE RB_type , //!< Radio Bearer Type
|
|
||||||
Transaction_t Trans_id //!< Transaction ID
|
|
||||||
);
|
|
||||||
/*!
|
|
||||||
\brief RRC Connection Establishment indication. Message received by RRM in CH
|
|
||||||
at completion of attachment phase of a new MR (after configuration MR
|
|
||||||
IPAddr). Here L3_info contains MR IPAddr. Message received by RRCI in MR
|
|
||||||
after configuration of initial RBs and reception of CH IPAddr. Here
|
|
||||||
L3_info contains CH IPAddr. For MR the RBID's of basic IP services are
|
|
||||||
also required.
|
|
||||||
*/
|
|
||||||
void rrc_cx_establish_ind(
|
|
||||||
Instance_t inst , //!< Identification de l'instance
|
|
||||||
L2_ID L2_id , //!< Layer 2 (MAC) ID
|
|
||||||
Transaction_t Trans_id , //!< Transaction ID
|
|
||||||
unsigned char *L3_info , //!< Optional L3 Information
|
|
||||||
L3_INFO_T L3_info_t , //!< Type of L3 Information
|
|
||||||
RB_ID DTCH_B_id , //!< RBID of broadcast IP service (MR only)
|
|
||||||
RB_ID DTCH_id //!< RBID of default IP service (MR only)
|
|
||||||
);
|
|
||||||
/*!
|
|
||||||
\brief RRCI Connection Establishment response. Received by RRC in MR at
|
|
||||||
completion of attachment phase and address configuration of a new MR.
|
|
||||||
L3_info contains IPAddr of MR.
|
|
||||||
*/
|
|
||||||
void rrci_cx_establish_resp(
|
|
||||||
Instance_t inst , //!< Identification de l'instance
|
|
||||||
Transaction_t Trans_id , //!< Transaction ID
|
|
||||||
unsigned char *L3_info , //!< Optional L3 Information
|
|
||||||
L3_INFO_T L3_info_t //!< Type of L3 Information
|
|
||||||
);
|
|
||||||
/*!
|
|
||||||
\brief Ask RRC to modify the QoS/Measurements of a radio bearer
|
|
||||||
*/
|
|
||||||
void rrm_rb_modify_req(
|
|
||||||
Instance_t inst , //!< Identification de l'instance
|
|
||||||
LCHAN_DESC *Lchan_desc , //!< Logical Channel Descriptor Array
|
|
||||||
MAC_RLC_MEAS_DESC *Mac_meas_desc , //!< MAC/RLC Measurement descriptors for RB
|
|
||||||
RB_ID Rb_id , //!< Radio Bearer ID
|
|
||||||
Transaction_t Trans_id //!< Transaction ID
|
|
||||||
);
|
|
||||||
/*!
|
|
||||||
\brief RRC response to rb_modify_req
|
|
||||||
*/
|
|
||||||
void rrc_rb_modify_resp(
|
|
||||||
Instance_t inst , //!< Identification de l'instance
|
|
||||||
Transaction_t Trans_id //!< Transaction ID
|
|
||||||
);
|
|
||||||
/*!
|
|
||||||
\brief RRC confirmation of rb_modify_req
|
|
||||||
*/
|
|
||||||
void rrc_rb_modify_cfm(
|
|
||||||
Instance_t inst , //!< Identification de l'instance
|
|
||||||
RB_ID Rb_id , //!< Radio Bearer ID used by RRC
|
|
||||||
Transaction_t Trans_id //!< Transaction ID
|
|
||||||
);
|
|
||||||
/*!
|
|
||||||
\brief Ask RRC to release a radio bearer
|
|
||||||
*/
|
|
||||||
void rrm_rb_release_req(
|
|
||||||
Instance_t inst , //!< Identification de l'instance
|
|
||||||
RB_ID Rb_id , //!< Radio Bearer ID
|
|
||||||
Transaction_t Trans_id //!< Transaction ID
|
|
||||||
);
|
|
||||||
/*!
|
|
||||||
\brief RRC response to rb_release_req
|
|
||||||
*/
|
|
||||||
void rrc_rb_release_resp(
|
|
||||||
Instance_t inst , //!< Identification de l'instance
|
|
||||||
Transaction_t Trans_id //!< Transaction ID
|
|
||||||
);
|
|
||||||
/*!
|
|
||||||
\brief RRC measurement indication
|
|
||||||
*/
|
|
||||||
void rrc_rb_meas_ind(
|
|
||||||
Instance_t inst , //!< Identification de l'instance
|
|
||||||
RB_ID Rb_id , //!< Radio Bearer ID
|
|
||||||
L2_ID L2_id , //!< Layer 2 (MAC) IDs for link
|
|
||||||
MEAS_MODE Meas_mode , //!< Measurement mode (periodic or event-driven)
|
|
||||||
MAC_RLC_MEAS_T Mac_rlc_meas , //!< MAC/RLC measurements
|
|
||||||
Transaction_t Trans_id //!< Transaction ID
|
|
||||||
);
|
|
||||||
|
|
||||||
/*!
|
|
||||||
\brief RRM response to rb_meas_ind
|
|
||||||
*/
|
|
||||||
void rrm_rb_meas_resp(
|
|
||||||
Instance_t inst , //!< Identification de l'instance
|
|
||||||
Transaction_t Trans_id //!< Transaction ID
|
|
||||||
);
|
|
||||||
/*!
|
|
||||||
\brief Configure a sensing measurement
|
|
||||||
*/
|
|
||||||
void rrm_sensing_meas_req(
|
|
||||||
Instance_t inst , //!< Identification de l'instance
|
|
||||||
L2_ID L2_id , //!< Layer 2 (MAC) ID
|
|
||||||
SENSING_MEAS_DESC Sensing_meas_desc, //!< Sensing Measurement Descriptor
|
|
||||||
Transaction_t Trans_id //!< Transaction ID
|
|
||||||
);
|
|
||||||
/*!
|
|
||||||
\brief RRC response to sensing_meas_req
|
|
||||||
*/
|
|
||||||
void rrc_sensing_meas_resp(
|
|
||||||
Instance_t inst , //!< Identification de l'instance
|
|
||||||
Transaction_t Trans_id //!< Transaction ID
|
|
||||||
);
|
|
||||||
/*!
|
|
||||||
\brief RRC sensing measurement indication
|
|
||||||
*/
|
|
||||||
void rrc_sensing_meas_ind(
|
|
||||||
Instance_t inst , //!< Identification de l'instance
|
|
||||||
L2_ID L2_id , //!< Layer 2 ID (MAC) of sensing node
|
|
||||||
unsigned int NB_meas , //!< Layer 2 ID (MAC) of sensing node
|
|
||||||
SENSING_MEAS_T *Sensing_meas , //!< Sensing Information
|
|
||||||
Transaction_t Trans_id //!< Transaction ID
|
|
||||||
);
|
|
||||||
/*!
|
|
||||||
\brief RRM response to sensing_meas_resp
|
|
||||||
*/
|
|
||||||
void rrm_sensing_meas_resp(
|
|
||||||
Instance_t inst , //!< Identification de l'instance
|
|
||||||
Transaction_t Trans_id //!< Transaction ID
|
|
||||||
);
|
|
||||||
/*!
|
|
||||||
\brief Clusterhead PHY-Synch Indication
|
|
||||||
*/
|
|
||||||
void rrc_phy_synch_to_CH_ind(
|
|
||||||
Instance_t inst , //!< Identification de l'instance
|
|
||||||
unsigned int Ch_index , //!< Clusterhead index
|
|
||||||
L2_ID L2_id //!< Layer 2 ID (MAC) of CH
|
|
||||||
);
|
|
||||||
/*!
|
|
||||||
\brief Mesh router PHY-Synch Indication
|
|
||||||
*/
|
|
||||||
void rrc_phy_synch_to_MR_ind(
|
|
||||||
Instance_t inst , //!< Identification de l'instance
|
|
||||||
L2_ID L2_id //!< Layer 2 ID (MAC) of MR
|
|
||||||
);
|
|
||||||
|
|
||||||
/*!
|
|
||||||
\brief Clusterhead PHY-Out-of-Synch Indication
|
|
||||||
*/
|
|
||||||
void rrc_phy_out_of_synch_CH_ind(
|
|
||||||
Instance_t inst , //!< Identification de l'instance
|
|
||||||
unsigned int Ch_index //!< Clusterhead Index
|
|
||||||
);
|
|
||||||
|
|
||||||
/*!
|
|
||||||
\brief MR loss indication
|
|
||||||
*/
|
|
||||||
void rrc_MR_loss_ind(
|
|
||||||
Instance_t inst , //!< Identification de l'instance
|
|
||||||
L2_ID L2_id //!< Layer 2 (MAC) ID
|
|
||||||
);
|
|
||||||
/*!
|
|
||||||
\brief Release all resources for MR
|
|
||||||
*/
|
|
||||||
void rrm_MR_release_all(
|
|
||||||
Instance_t inst , //!< Identification de l'instance
|
|
||||||
L2_ID L2_id //!< Layer 2 (MAC) ID
|
|
||||||
);
|
|
||||||
/*!
|
|
||||||
\brief MR attachement indication. Sent by RRC to RRM to indicate the MAC ID of
|
|
||||||
a new MR attached to CH at layer 2
|
|
||||||
*/
|
|
||||||
void rrc_MR_attach_ind(
|
|
||||||
Instance_t inst , //!< Identification de l'instance
|
|
||||||
L2_ID L2_id //!< Layer 2 (MAC) ID
|
|
||||||
);
|
|
||||||
/*!
|
|
||||||
\brief initialization CH request . Sent by RRM to RRC to create the default
|
|
||||||
Radio bearer : SRB0 and SRB1
|
|
||||||
*/
|
|
||||||
|
|
||||||
void rrm_init_ch_req(
|
|
||||||
Instance_t inst , //!< Identification de l'instance
|
|
||||||
Transaction_t Trans_id , //!< Transaction ID
|
|
||||||
LCHAN_DESC *Lchan_desc_srb0 , //!< Logical Channel Descriptor Array for SRB0
|
|
||||||
LCHAN_DESC *Lchan_desc_srb1 , //!< Logical Channel Descriptor Array for SRB1
|
|
||||||
L2_ID *L2_id //!< Layer 2 (MAC) ID
|
|
||||||
) ;
|
|
||||||
|
|
||||||
/*!
|
|
||||||
\brief initialization MR request . Sent by RRCI to RRC to create the default
|
|
||||||
Radio bearer : SRB0 and SRB1
|
|
||||||
*/
|
|
||||||
void rrci_init_mr_req(
|
|
||||||
Instance_t inst , //!< Identification de l'instance
|
|
||||||
Transaction_t Trans_id , //!< Transaction ID
|
|
||||||
LCHAN_DESC *Lchan_desc_srb0 , //!< Logical Channel Descriptor Array for SRB0
|
|
||||||
LCHAN_DESC *Lchan_desc_srb1 , //!< Logical Channel Descriptor Array for SRB1
|
|
||||||
unsigned char CH_index , //!< index to identify the CH
|
|
||||||
L2_ID *L2_id //!< Layer 2 (MAC) ID
|
|
||||||
);
|
|
||||||
|
|
||||||
/*!
|
|
||||||
\brief sns and ip sensing measurement indication
|
|
||||||
*/
|
|
||||||
void rrc_update_sens( //mod_lor_10_01_25: RRC function, but also IP function
|
|
||||||
Instance_t inst , //!< Identification de l'instance
|
|
||||||
L2_ID L2_id , //!< Layer 2 ID (MAC) of sensing node
|
|
||||||
unsigned int NB_info , //!< Number of channels info
|
|
||||||
Sens_ch_t *Sense_meas , //!< Sensing Information
|
|
||||||
double info_time //!< Info time
|
|
||||||
);
|
|
||||||
|
|
||||||
/*!
|
|
||||||
\brief RRC starting sensing request
|
|
||||||
*/
|
|
||||||
void rrc_init_scan_req(
|
|
||||||
Instance_t inst , //!< instance ID
|
|
||||||
L2_ID L2_id , //!< FC address
|
|
||||||
unsigned int Start_fr,
|
|
||||||
unsigned int Stop_fr,
|
|
||||||
unsigned int Meas_band,
|
|
||||||
unsigned int Meas_tpf,
|
|
||||||
unsigned int Nb_channels,
|
|
||||||
unsigned int Overlap,
|
|
||||||
unsigned int Sampl_freq,
|
|
||||||
Transaction_t Trans_id //!< Transaction ID
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
/*!
|
|
||||||
\brief RRC ending sensing confirmation
|
|
||||||
*/
|
|
||||||
void rrc_end_scan_conf(
|
|
||||||
Instance_t inst , //!< instance ID
|
|
||||||
L2_ID L2_id ,
|
|
||||||
Transaction_t Trans_id //!< Transaction ID
|
|
||||||
|
|
||||||
);
|
|
||||||
|
|
||||||
/*!
|
|
||||||
\brief RRC ending sensing request (sensors side)
|
|
||||||
*/
|
|
||||||
void rrc_end_scan_req(
|
|
||||||
Instance_t inst , //!< instance ID
|
|
||||||
L2_ID L2_id ,
|
|
||||||
Transaction_t Trans_id //!< Transaction ID
|
|
||||||
|
|
||||||
);
|
|
||||||
|
|
||||||
/*!
|
|
||||||
\brief RRC starting monitoring request
|
|
||||||
*/
|
|
||||||
void rrc_init_mon_req(
|
|
||||||
Instance_t inst , //!< identification de l'instance
|
|
||||||
L2_ID L2_id , //!< FC address
|
|
||||||
unsigned int *ch_to_scan ,
|
|
||||||
unsigned int NB_chan ,
|
|
||||||
unsigned int interv , //!< sensing freq.
|
|
||||||
Transaction_t Trans_id //!< Transaction ID
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
/*!
|
|
||||||
\brief update open frequencies -> correspondent message via IP
|
|
||||||
*/
|
|
||||||
unsigned int update_open_freq( //mod_lor_10_01_25: IP function; //mod_lor_10_05_18: return unsigned int instead of void
|
|
||||||
Instance_t inst, //!< instance ID
|
|
||||||
L2_ID L2_id, //!< L2_id of the FC/CH
|
|
||||||
unsigned int NB_chan,
|
|
||||||
unsigned int *occ_channels , //!< vector on wich the selected frequencies will be saved //mod_lor_10_05_18
|
|
||||||
CHANNELS_DB_T *fr_channels,
|
|
||||||
Transaction_t Trans_id
|
|
||||||
);
|
|
||||||
|
|
||||||
/*!
|
|
||||||
\brief ask for frequencies -> correspondent message via IP
|
|
||||||
*/
|
|
||||||
unsigned int open_freq_query( //mod_lor_10_01_25: IP function
|
|
||||||
Instance_t inst,
|
|
||||||
L2_ID L2_id ,
|
|
||||||
QOS_CLASS_T QoS ,
|
|
||||||
Transaction_t Trans_id
|
|
||||||
);
|
|
||||||
|
|
||||||
/*!
|
|
||||||
\brief update secondary network frequencies in use -> correspondent message via IP
|
|
||||||
*/
|
|
||||||
unsigned int update_SN_occ_freq( //mod_lor_10_01_25: IP function
|
|
||||||
Instance_t inst , //!< instance ID
|
|
||||||
L2_ID L2_id , //!< Layer 2 (MAC) ID of BTS
|
|
||||||
unsigned int NB_chan ,
|
|
||||||
unsigned int *occ_channels ,
|
|
||||||
Transaction_t Trans_id //!< Transaction ID
|
|
||||||
);
|
|
||||||
|
|
||||||
/*!
|
|
||||||
\brief RRC cluster scan request from CH1 reported to RRM of CH2
|
|
||||||
*/
|
|
||||||
void rrc_clust_scan_req(
|
|
||||||
Instance_t inst , //!< instance ID
|
|
||||||
L2_ID L2_id , //!< Layer 2 (MAC) ID of CH2
|
|
||||||
float interv ,
|
|
||||||
COOPERATION_T coop ,
|
|
||||||
Transaction_t Trans_id
|
|
||||||
);
|
|
||||||
|
|
||||||
/*!
|
|
||||||
\brief RRC starting monitoring request ordered from another CH
|
|
||||||
*/
|
|
||||||
void rrc_clust_mon_req(
|
|
||||||
Instance_t inst , //!< identification de l'instance
|
|
||||||
L2_ID L2_id , //!< CH1 address
|
|
||||||
unsigned int *ch_to_scan ,
|
|
||||||
unsigned int NB_chan ,
|
|
||||||
float interv , //!< sensing freq.
|
|
||||||
Transaction_t Trans_id //!< Transaction ID
|
|
||||||
);
|
|
||||||
|
|
||||||
/*!
|
|
||||||
\brief RRC reported confirmation about the connection
|
|
||||||
*/
|
|
||||||
void rrc_init_conn_conf(
|
|
||||||
Instance_t inst , //!< identification de l'instance
|
|
||||||
L2_ID L2_id ,
|
|
||||||
unsigned int Session_id ,
|
|
||||||
Transaction_t Trans_id
|
|
||||||
);
|
|
||||||
|
|
||||||
/*!
|
|
||||||
\brief RRC reported confirmation from SU2 on the proposed channels
|
|
||||||
*/
|
|
||||||
void rrc_freq_all_prop_conf(
|
|
||||||
Instance_t inst ,
|
|
||||||
L2_ID L2_id ,
|
|
||||||
unsigned int Session_id ,
|
|
||||||
unsigned int NB_free_ch ,
|
|
||||||
CHANNEL_T *fr_channels ,
|
|
||||||
Transaction_t Trans_id
|
|
||||||
);
|
|
||||||
|
|
||||||
/*!
|
|
||||||
\brief RRC reported assignement from CH of a channel (SENDORA scenario 2 distr)
|
|
||||||
*/
|
|
||||||
void rrc_rep_freq_ack(
|
|
||||||
Instance_t inst ,
|
|
||||||
L2_ID L2_id_ch ,
|
|
||||||
L2_ID L2_id_source ,
|
|
||||||
L2_ID L2_id_dest ,
|
|
||||||
unsigned int Session_id ,
|
|
||||||
CHANNEL_T all_channel ,
|
|
||||||
Transaction_t Trans_id
|
|
||||||
);
|
|
||||||
|
|
||||||
/*!
|
|
||||||
\brief RRC init connection request from another SU (SENDORA scenario 2 distr)
|
|
||||||
*/
|
|
||||||
void rrc_init_conn_req(
|
|
||||||
Instance_t inst ,
|
|
||||||
L2_ID L2_id ,
|
|
||||||
unsigned int Session_id ,
|
|
||||||
QOS_CLASS_T QoS_class ,
|
|
||||||
Transaction_t Trans_id
|
|
||||||
);
|
|
||||||
|
|
||||||
/*!
|
|
||||||
\brief RRC reported proposed channels from SU1 in SU2
|
|
||||||
*/
|
|
||||||
void rrc_freq_all_prop(
|
|
||||||
Instance_t inst ,
|
|
||||||
L2_ID L2_id ,
|
|
||||||
unsigned int Session_id ,
|
|
||||||
unsigned int NB_free_ch ,
|
|
||||||
CHANNEL_T *fr_channels ,
|
|
||||||
Transaction_t Trans_id
|
|
||||||
);
|
|
||||||
|
|
||||||
/*!
|
|
||||||
\brief RRC reported proposed channels from SU1 in CH
|
|
||||||
*/
|
|
||||||
void rrc_rep_freq_all(
|
|
||||||
Instance_t inst ,
|
|
||||||
L2_ID L2_id_source ,
|
|
||||||
L2_ID L2_id_dest ,
|
|
||||||
unsigned int Session_id ,
|
|
||||||
unsigned int NB_prop_ch ,
|
|
||||||
CHANNEL_T *pr_channels ,
|
|
||||||
Transaction_t Trans_id
|
|
||||||
);
|
|
||||||
|
|
||||||
/*!
|
|
||||||
\brief IP interface. Updating of the sensing measures -> correspondent message via IP
|
|
||||||
*/
|
|
||||||
unsigned int update_sens_results(
|
|
||||||
Instance_t inst , //!< Identification de l'instance
|
|
||||||
L2_ID L2_id , //!< Adresse L2 of the source of information
|
|
||||||
unsigned int NB_info , //!< Number of channel info
|
|
||||||
Sens_ch_t *Sens_meas , //!< Pointer to the sensing information
|
|
||||||
double info_time
|
|
||||||
);
|
|
||||||
|
|
||||||
/*!
|
|
||||||
\brief Sensing Unit interface. End sensing confirmation
|
|
||||||
*/
|
|
||||||
void sns_end_scan_conf(
|
|
||||||
Instance_t inst //!< Identification de l'instance
|
|
||||||
);
|
|
||||||
|
|
||||||
//mod_lor_10_05_10++
|
|
||||||
/*!
|
|
||||||
\brief Updating sensing information received from collaborative Cluster
|
|
||||||
*/
|
|
||||||
void up_coll_sens_results( //AAA: to add weights for the collaborative cluster information
|
|
||||||
Instance_t inst , //!< Identification de l'instance
|
|
||||||
L2_ID L2_id , //!< Adresse L2 of the source of information
|
|
||||||
unsigned int NB_info , //!< Number of channel info
|
|
||||||
Sens_ch_t *Sens_meas , //!< Pointer to the sensing information
|
|
||||||
double info_time
|
|
||||||
);//mod_lor_10_05_10--
|
|
||||||
|
|
||||||
/*!
|
|
||||||
\brief Received request of frequencies from secondary user -> attribute available channels
|
|
||||||
*/
|
|
||||||
unsigned int ask_freq_to_CH(
|
|
||||||
Instance_t inst , //!< identification de l'instance
|
|
||||||
L2_ID L2_id[NB_SENS_MAX] , //!< L2_id of the SU
|
|
||||||
L2_ID L2_id_dest[NB_SENS_MAX], //!< L2_id of the SU dest
|
|
||||||
unsigned int N_users , //!< quality of service required (i.e. number of channels required)
|
|
||||||
Transaction_t Trans_id //!< Transaction ID
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
/*! @} */
|
|
||||||
|
|
||||||
@@ -1,305 +0,0 @@
|
|||||||
# Doxyfile 1.4.6
|
|
||||||
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
# Project related configuration options
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
PROJECT_NAME = "Radio Resource Managment (RRM)"
|
|
||||||
PROJECT_NUMBER = 0.0.1
|
|
||||||
OUTPUT_DIRECTORY = /home/burlot/rrm_nl/doc/rrm/
|
|
||||||
CREATE_SUBDIRS = NO
|
|
||||||
OUTPUT_LANGUAGE = English
|
|
||||||
USE_WINDOWS_ENCODING = NO
|
|
||||||
BRIEF_MEMBER_DESC = YES
|
|
||||||
REPEAT_BRIEF = YES
|
|
||||||
ABBREVIATE_BRIEF = "The $name class" \
|
|
||||||
"The $name widget" \
|
|
||||||
"The $name file" \
|
|
||||||
is \
|
|
||||||
provides \
|
|
||||||
specifies \
|
|
||||||
contains \
|
|
||||||
represents \
|
|
||||||
a \
|
|
||||||
an \
|
|
||||||
the
|
|
||||||
ALWAYS_DETAILED_SEC = NO
|
|
||||||
INLINE_INHERITED_MEMB = NO
|
|
||||||
FULL_PATH_NAMES = YES
|
|
||||||
STRIP_FROM_PATH = /home/burlot/rrm_nl/
|
|
||||||
STRIP_FROM_INC_PATH =
|
|
||||||
SHORT_NAMES = NO
|
|
||||||
JAVADOC_AUTOBRIEF = NO
|
|
||||||
MULTILINE_CPP_IS_BRIEF = NO
|
|
||||||
DETAILS_AT_TOP = NO
|
|
||||||
INHERIT_DOCS = YES
|
|
||||||
SEPARATE_MEMBER_PAGES = NO
|
|
||||||
TAB_SIZE = 4
|
|
||||||
ALIASES =
|
|
||||||
OPTIMIZE_OUTPUT_FOR_C = YES
|
|
||||||
OPTIMIZE_OUTPUT_JAVA = NO
|
|
||||||
BUILTIN_STL_SUPPORT = NO
|
|
||||||
DISTRIBUTE_GROUP_DOC = NO
|
|
||||||
SUBGROUPING = YES
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
# Build related configuration options
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
EXTRACT_ALL = NO
|
|
||||||
EXTRACT_PRIVATE = NO
|
|
||||||
EXTRACT_STATIC = NO
|
|
||||||
EXTRACT_LOCAL_CLASSES = YES
|
|
||||||
EXTRACT_LOCAL_METHODS = NO
|
|
||||||
HIDE_UNDOC_MEMBERS = YES
|
|
||||||
HIDE_UNDOC_CLASSES = YES
|
|
||||||
HIDE_FRIEND_COMPOUNDS = NO
|
|
||||||
HIDE_IN_BODY_DOCS = NO
|
|
||||||
INTERNAL_DOCS = NO
|
|
||||||
CASE_SENSE_NAMES = YES
|
|
||||||
HIDE_SCOPE_NAMES = NO
|
|
||||||
SHOW_INCLUDE_FILES = YES
|
|
||||||
INLINE_INFO = YES
|
|
||||||
SORT_MEMBER_DOCS = YES
|
|
||||||
SORT_BRIEF_DOCS = NO
|
|
||||||
SORT_BY_SCOPE_NAME = NO
|
|
||||||
GENERATE_TODOLIST = YES
|
|
||||||
GENERATE_TESTLIST = YES
|
|
||||||
GENERATE_BUGLIST = YES
|
|
||||||
GENERATE_DEPRECATEDLIST= YES
|
|
||||||
ENABLED_SECTIONS =
|
|
||||||
MAX_INITIALIZER_LINES = 30
|
|
||||||
SHOW_USED_FILES = YES
|
|
||||||
SHOW_DIRECTORIES = NO
|
|
||||||
FILE_VERSION_FILTER =
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
# configuration options related to warning and progress messages
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
QUIET = NO
|
|
||||||
WARNINGS = YES
|
|
||||||
WARN_IF_UNDOCUMENTED = YES
|
|
||||||
WARN_IF_DOC_ERROR = YES
|
|
||||||
WARN_NO_PARAMDOC = NO
|
|
||||||
WARN_FORMAT = "$file:$line: $text"
|
|
||||||
WARN_LOGFILE =
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
# configuration options related to the input files
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
INPUT = /home/burlot/rrm_nl/ch_init.c \
|
|
||||||
/home/burlot/rrm_nl/ch_init.h \
|
|
||||||
/home/burlot/rrm_nl/cmm_msg.c \
|
|
||||||
/home/burlot/rrm_nl/cmm_msg.h \
|
|
||||||
/home/burlot/rrm_nl/debug.h \
|
|
||||||
/home/burlot/rrm_nl/mr_attach.c \
|
|
||||||
/home/burlot/rrm_nl/mr_attach.h \
|
|
||||||
/home/burlot/rrm_nl/msg_mngt.c \
|
|
||||||
/home/burlot/rrm_nl/msg_mngt.h \
|
|
||||||
/home/burlot/rrm_nl/neighbor_db.c \
|
|
||||||
/home/burlot/rrm_nl/neighbor_db.h \
|
|
||||||
/home/burlot/rrm_nl/pusu_msg.c \
|
|
||||||
/home/burlot/rrm_nl/pusu_msg.h \
|
|
||||||
/home/burlot/rrm_nl/rb_db.c \
|
|
||||||
/home/burlot/rrm_nl/rb_db.h \
|
|
||||||
/home/burlot/rrm_nl/rb_mngt.c \
|
|
||||||
/home/burlot/rrm_nl/rb_mngt.h \
|
|
||||||
/home/burlot/rrm_nl/rrc_msg.c \
|
|
||||||
/home/burlot/rrm_nl/rrc_msg.h \
|
|
||||||
/home/burlot/rrm_nl/rrm.c \
|
|
||||||
/home/burlot/rrm_nl/rrm_constant.c \
|
|
||||||
/home/burlot/rrm_nl/rrm_constant.h \
|
|
||||||
/home/burlot/rrm_nl/rrm.h \
|
|
||||||
/home/burlot/rrm_nl/rrm_sock.c \
|
|
||||||
/home/burlot/rrm_nl/rrm_sock.h \
|
|
||||||
/home/burlot/rrm_nl/rrm_util.c \
|
|
||||||
/home/burlot/rrm_nl/rrm_util.h \
|
|
||||||
/home/burlot/rrm_nl/interface/cmm_ral_interface.h \
|
|
||||||
/home/burlot/rrm_nl/interface/cmm_rrm_interface.h \
|
|
||||||
/home/burlot/rrm_nl/interface/L3_rrc_defs.h \
|
|
||||||
/home/burlot/rrm_nl/interface/L3_rrc_interface.h \
|
|
||||||
/home/burlot/rrm_nl/transact.c \
|
|
||||||
/home/burlot/rrm_nl/transact.h
|
|
||||||
FILE_PATTERNS = *.c \
|
|
||||||
*.cc \
|
|
||||||
*.cxx \
|
|
||||||
*.cpp \
|
|
||||||
*.c++ \
|
|
||||||
*.d \
|
|
||||||
*.java \
|
|
||||||
*.ii \
|
|
||||||
*.ixx \
|
|
||||||
*.ipp \
|
|
||||||
*.i++ \
|
|
||||||
*.inl \
|
|
||||||
*.h \
|
|
||||||
*.hh \
|
|
||||||
*.hxx \
|
|
||||||
*.hpp \
|
|
||||||
*.h++ \
|
|
||||||
*.idl \
|
|
||||||
*.odl \
|
|
||||||
*.cs \
|
|
||||||
*.php \
|
|
||||||
*.php3 \
|
|
||||||
*.inc \
|
|
||||||
*.m \
|
|
||||||
*.mm \
|
|
||||||
*.dox \
|
|
||||||
*.py \
|
|
||||||
*.C \
|
|
||||||
*.CC \
|
|
||||||
*.C++ \
|
|
||||||
*.II \
|
|
||||||
*.I++ \
|
|
||||||
*.H \
|
|
||||||
*.HH \
|
|
||||||
*.H++ \
|
|
||||||
*.CS \
|
|
||||||
*.PHP \
|
|
||||||
*.PHP3 \
|
|
||||||
*.M \
|
|
||||||
*.MM \
|
|
||||||
*.PY
|
|
||||||
RECURSIVE = NO
|
|
||||||
EXCLUDE =
|
|
||||||
EXCLUDE_SYMLINKS = NO
|
|
||||||
EXCLUDE_PATTERNS =
|
|
||||||
EXAMPLE_PATH =
|
|
||||||
EXAMPLE_PATTERNS = *
|
|
||||||
EXAMPLE_RECURSIVE = NO
|
|
||||||
IMAGE_PATH =
|
|
||||||
INPUT_FILTER =
|
|
||||||
FILTER_PATTERNS =
|
|
||||||
FILTER_SOURCE_FILES = NO
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
# configuration options related to source browsing
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
SOURCE_BROWSER = YES
|
|
||||||
INLINE_SOURCES = YES
|
|
||||||
STRIP_CODE_COMMENTS = YES
|
|
||||||
REFERENCED_BY_RELATION = YES
|
|
||||||
REFERENCES_RELATION = YES
|
|
||||||
USE_HTAGS = NO
|
|
||||||
VERBATIM_HEADERS = YES
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
# configuration options related to the alphabetical class index
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
ALPHABETICAL_INDEX = NO
|
|
||||||
COLS_IN_ALPHA_INDEX = 5
|
|
||||||
IGNORE_PREFIX =
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
# configuration options related to the HTML output
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
GENERATE_HTML = YES
|
|
||||||
HTML_OUTPUT = html
|
|
||||||
HTML_FILE_EXTENSION = .html
|
|
||||||
HTML_HEADER =
|
|
||||||
HTML_FOOTER =
|
|
||||||
HTML_STYLESHEET =
|
|
||||||
HTML_ALIGN_MEMBERS = YES
|
|
||||||
GENERATE_HTMLHELP = NO
|
|
||||||
CHM_FILE =
|
|
||||||
HHC_LOCATION =
|
|
||||||
GENERATE_CHI = NO
|
|
||||||
BINARY_TOC = NO
|
|
||||||
TOC_EXPAND = NO
|
|
||||||
DISABLE_INDEX = NO
|
|
||||||
ENUM_VALUES_PER_LINE = 4
|
|
||||||
GENERATE_TREEVIEW = NO
|
|
||||||
TREEVIEW_WIDTH = 250
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
# configuration options related to the LaTeX output
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
GENERATE_LATEX = NO
|
|
||||||
LATEX_OUTPUT = latex
|
|
||||||
LATEX_CMD_NAME = latex
|
|
||||||
MAKEINDEX_CMD_NAME = makeindex
|
|
||||||
COMPACT_LATEX = NO
|
|
||||||
PAPER_TYPE = a4wide
|
|
||||||
EXTRA_PACKAGES =
|
|
||||||
LATEX_HEADER =
|
|
||||||
PDF_HYPERLINKS = NO
|
|
||||||
USE_PDFLATEX = NO
|
|
||||||
LATEX_BATCHMODE = NO
|
|
||||||
LATEX_HIDE_INDICES = NO
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
# configuration options related to the RTF output
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
GENERATE_RTF = NO
|
|
||||||
RTF_OUTPUT = rtf
|
|
||||||
COMPACT_RTF = NO
|
|
||||||
RTF_HYPERLINKS = NO
|
|
||||||
RTF_STYLESHEET_FILE =
|
|
||||||
RTF_EXTENSIONS_FILE =
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
# configuration options related to the man page output
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
GENERATE_MAN = NO
|
|
||||||
MAN_OUTPUT = man
|
|
||||||
MAN_EXTENSION = .3
|
|
||||||
MAN_LINKS = NO
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
# configuration options related to the XML output
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
GENERATE_XML = NO
|
|
||||||
XML_OUTPUT = xml
|
|
||||||
XML_SCHEMA =
|
|
||||||
XML_DTD =
|
|
||||||
XML_PROGRAMLISTING = YES
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
# configuration options for the AutoGen Definitions output
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
GENERATE_AUTOGEN_DEF = NO
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
# configuration options related to the Perl module output
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
GENERATE_PERLMOD = NO
|
|
||||||
PERLMOD_LATEX = NO
|
|
||||||
PERLMOD_PRETTY = YES
|
|
||||||
PERLMOD_MAKEVAR_PREFIX =
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
# Configuration options related to the preprocessor
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
ENABLE_PREPROCESSING = YES
|
|
||||||
MACRO_EXPANSION = NO
|
|
||||||
EXPAND_ONLY_PREDEF = NO
|
|
||||||
SEARCH_INCLUDES = YES
|
|
||||||
INCLUDE_PATH =
|
|
||||||
INCLUDE_FILE_PATTERNS =
|
|
||||||
PREDEFINED =
|
|
||||||
EXPAND_AS_DEFINED =
|
|
||||||
SKIP_FUNCTION_MACROS = YES
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
# Configuration::additions related to external references
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
TAGFILES =
|
|
||||||
GENERATE_TAGFILE =
|
|
||||||
ALLEXTERNALS = NO
|
|
||||||
EXTERNAL_GROUPS = YES
|
|
||||||
PERL_PATH = /usr/bin/perl
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
# Configuration options related to the dot tool
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
CLASS_DIAGRAMS = NO
|
|
||||||
HIDE_UNDOC_RELATIONS = YES
|
|
||||||
HAVE_DOT = YES
|
|
||||||
CLASS_GRAPH = YES
|
|
||||||
COLLABORATION_GRAPH = YES
|
|
||||||
GROUP_GRAPHS = YES
|
|
||||||
UML_LOOK = NO
|
|
||||||
TEMPLATE_RELATIONS = NO
|
|
||||||
INCLUDE_GRAPH = YES
|
|
||||||
INCLUDED_BY_GRAPH = YES
|
|
||||||
CALL_GRAPH = YES
|
|
||||||
GRAPHICAL_HIERARCHY = YES
|
|
||||||
DIRECTORY_GRAPH = YES
|
|
||||||
DOT_IMAGE_FORMAT = png
|
|
||||||
DOT_PATH =
|
|
||||||
DOTFILE_DIRS =
|
|
||||||
MAX_DOT_GRAPH_WIDTH = 1024
|
|
||||||
MAX_DOT_GRAPH_HEIGHT = 1024
|
|
||||||
MAX_DOT_GRAPH_DEPTH = 1000
|
|
||||||
DOT_TRANSPARENT = NO
|
|
||||||
DOT_MULTI_TARGETS = NO
|
|
||||||
GENERATE_LEGEND = YES
|
|
||||||
DOT_CLEANUP = YES
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
# Configuration::additions related to the search engine
|
|
||||||
#---------------------------------------------------------------------------
|
|
||||||
SEARCHENGINE = NO
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
/home/burlot/rrm/emul/kemul_nl.ko
|
|
||||||
/home/burlot/rrm/emul/kemul_nl.o
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
obj-m += kemul_nl.o
|
|
||||||
|
|
||||||
all:
|
|
||||||
make -C ..
|
|
||||||
|
|
||||||
modules:
|
|
||||||
@echo "**** module $(obj-m) ******"
|
|
||||||
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules
|
|
||||||
|
|
||||||
cleank:
|
|
||||||
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean
|
|
||||||
@@ -1,214 +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 actdiff.c
|
|
||||||
|
|
||||||
\brief Gestion des actions differees d'envoi de messages sur les sockets
|
|
||||||
( emulation du traitement par un retard )
|
|
||||||
|
|
||||||
|
|
||||||
\author BURLOT Pascal
|
|
||||||
|
|
||||||
\date 13/08/08
|
|
||||||
|
|
||||||
|
|
||||||
\par Historique:
|
|
||||||
$Author$ $Date$ $Revision$
|
|
||||||
$Id$
|
|
||||||
$Log$
|
|
||||||
|
|
||||||
*******************************************************************************
|
|
||||||
*/
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <errno.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <unistd.h>
|
|
||||||
#include <time.h>
|
|
||||||
|
|
||||||
#include <sys/types.h>
|
|
||||||
#include <sys/socket.h>
|
|
||||||
#include <sys/un.h>
|
|
||||||
|
|
||||||
#include "debug.h"
|
|
||||||
#include "L3_rrc_defs.h"
|
|
||||||
#include "rrm_util.h"
|
|
||||||
#include "rrm_sock.h"
|
|
||||||
#include "actdiff.h"
|
|
||||||
|
|
||||||
#define DBG_ACTDIFF 0
|
|
||||||
|
|
||||||
#if DBG_ACTDIFF==0
|
|
||||||
#define PRINT_ACTDIFF(...)
|
|
||||||
#else
|
|
||||||
#define PRINT_ACTDIFF(...) print_actdiff( __VA_ARGS__ )
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
/******************************************************************************
|
|
||||||
* \brief La fonction affiche a l'ecran la liste
|
|
||||||
*
|
|
||||||
* \return aucune valeur retournee
|
|
||||||
*/
|
|
||||||
static void print_actdiff( actdiff_t *pEntry )
|
|
||||||
{
|
|
||||||
actdiff_t *pCurrentItem = pEntry;
|
|
||||||
|
|
||||||
fprintf(stderr,"actdiff_t=[\n");
|
|
||||||
|
|
||||||
while ( pCurrentItem != NULL) {
|
|
||||||
fprintf(stderr," @%p(.tv=%lf, .id=%d, .sock=%p, .msg=%p, .next=%p)\n",
|
|
||||||
pCurrentItem, pCurrentItem->tv, pCurrentItem->id, pCurrentItem->sock,
|
|
||||||
pCurrentItem->msg, pCurrentItem->next);
|
|
||||||
|
|
||||||
pCurrentItem = pCurrentItem->next ;
|
|
||||||
}
|
|
||||||
|
|
||||||
fprintf(stderr," ]\n");
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/******************************************************************************
|
|
||||||
* \brief La fonction ajoute un element en fin de la liste des actions differees
|
|
||||||
* non-cloturees.
|
|
||||||
*
|
|
||||||
* \return retourne le pointeur de debut de liste.
|
|
||||||
*/
|
|
||||||
actdiff_t *add_actdiff(
|
|
||||||
actdiff_t **pEntry ,
|
|
||||||
double delai,
|
|
||||||
int id,
|
|
||||||
sock_rrm_t *sock,
|
|
||||||
msg_t *msg
|
|
||||||
)
|
|
||||||
{
|
|
||||||
actdiff_t *pNewItem = RRM_MALLOC(actdiff_t , 1 ) ;
|
|
||||||
|
|
||||||
PNULL(pNewItem) ;
|
|
||||||
|
|
||||||
if ( pNewItem == NULL )
|
|
||||||
return NULL ;
|
|
||||||
|
|
||||||
pNewItem->id = id ;
|
|
||||||
pNewItem->msg = msg ;
|
|
||||||
pNewItem->sock = sock ;
|
|
||||||
|
|
||||||
pNewItem->tv = get_currentclock() + delai ;
|
|
||||||
pNewItem->next = NULL ;
|
|
||||||
|
|
||||||
if ( *pEntry == NULL ) {
|
|
||||||
*pEntry = pNewItem ;
|
|
||||||
} else {
|
|
||||||
actdiff_t *pCurrentItem = *pEntry;
|
|
||||||
actdiff_t *pNextItem ;
|
|
||||||
|
|
||||||
while ( pCurrentItem != NULL ) {
|
|
||||||
pNextItem = pCurrentItem->next ;
|
|
||||||
|
|
||||||
if ( pNextItem == NULL ) {
|
|
||||||
pCurrentItem->next = pNewItem ;
|
|
||||||
break ;
|
|
||||||
}
|
|
||||||
|
|
||||||
pCurrentItem = pNextItem ;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
PRINT_ACTDIFF(*pEntry) ;
|
|
||||||
|
|
||||||
return pNewItem ;
|
|
||||||
}
|
|
||||||
|
|
||||||
/******************************************************************************
|
|
||||||
* \brief La fonction detruit l'action no Id de la liste .
|
|
||||||
*
|
|
||||||
* \return aucune valeur.
|
|
||||||
*/
|
|
||||||
void del_actdiff( actdiff_t **pEntry , int id )
|
|
||||||
{
|
|
||||||
actdiff_t *pCurrentItem = *pEntry;
|
|
||||||
actdiff_t *pNextItem ;
|
|
||||||
actdiff_t **ppPrevItem = pEntry ;
|
|
||||||
|
|
||||||
if ( (pCurrentItem == NULL) || (pEntry==NULL))
|
|
||||||
return ;
|
|
||||||
|
|
||||||
while ( pCurrentItem != NULL ) {
|
|
||||||
pNextItem = pCurrentItem->next ;
|
|
||||||
|
|
||||||
if ( pCurrentItem->id == id ) {
|
|
||||||
*ppPrevItem = pNextItem;
|
|
||||||
|
|
||||||
RRM_FREE( pCurrentItem ) ;
|
|
||||||
break ;
|
|
||||||
}
|
|
||||||
|
|
||||||
ppPrevItem = &(pCurrentItem->next) ;
|
|
||||||
pCurrentItem = pNextItem ;
|
|
||||||
}
|
|
||||||
|
|
||||||
PRINT_ACTDIFF(*pEntry) ;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/******************************************************************************
|
|
||||||
* \brief La fonction traite les actions arrivees a echeance.
|
|
||||||
*
|
|
||||||
* \return aucune valeur.
|
|
||||||
*/
|
|
||||||
void processing_actdiff( actdiff_t **pEntry )
|
|
||||||
{
|
|
||||||
double tv_current ;
|
|
||||||
|
|
||||||
actdiff_t *pCurrentItem = *pEntry;
|
|
||||||
actdiff_t *pNextItem ;
|
|
||||||
|
|
||||||
if ( (pCurrentItem == NULL) || (pEntry==NULL))
|
|
||||||
return ;
|
|
||||||
|
|
||||||
tv_current = get_currentclock() ;
|
|
||||||
|
|
||||||
while ( pCurrentItem != NULL ) {
|
|
||||||
pNextItem = pCurrentItem->next ;
|
|
||||||
|
|
||||||
if ( pCurrentItem->tv <= tv_current ) {
|
|
||||||
send_msg( pCurrentItem->sock, pCurrentItem->msg ) ;
|
|
||||||
//fprintf(stderr,"act diff: %lf \n", tv_current);
|
|
||||||
del_actdiff(pEntry,pCurrentItem->id) ;
|
|
||||||
}
|
|
||||||
|
|
||||||
pCurrentItem = pNextItem ;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1,83 +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 actdiff.h
|
|
||||||
|
|
||||||
\brief Fichier d'entête
|
|
||||||
|
|
||||||
Il contient les declarations de type, des defines relatif aux
|
|
||||||
fonctions à la gestion des actions differees.
|
|
||||||
|
|
||||||
\author BURLOT Pascal
|
|
||||||
|
|
||||||
\date 13/08/08
|
|
||||||
|
|
||||||
|
|
||||||
\par Historique:
|
|
||||||
$Author$ $Date$ $Revision$
|
|
||||||
$Id$
|
|
||||||
$Log$
|
|
||||||
|
|
||||||
*******************************************************************************
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef ACTDIFF_H
|
|
||||||
#define ACTDIFF_H
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
///< \brief action differee ( a traiter ulterieurement )
|
|
||||||
typedef struct actdiff_s {
|
|
||||||
double tv ; ///< date du traitement
|
|
||||||
int id ; ///< ID de l'action differee
|
|
||||||
sock_rrm_t *sock ; ///< socket associe
|
|
||||||
msg_t *msg ; ///< message a envoyer
|
|
||||||
struct actdiff_s *next ; ///< pointeur sur la prochaine action differee
|
|
||||||
} actdiff_t ;
|
|
||||||
|
|
||||||
actdiff_t *add_actdiff(
|
|
||||||
actdiff_t **pEntry ,
|
|
||||||
double delai,
|
|
||||||
int id,
|
|
||||||
sock_rrm_t *sock,
|
|
||||||
msg_t *msg
|
|
||||||
);
|
|
||||||
|
|
||||||
void processing_actdiff( actdiff_t **pEntry ) ;
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif /* ACTDIFF_H */
|
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -1,79 +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 emul_interface.h
|
|
||||||
|
|
||||||
\brief Fichier d'entête
|
|
||||||
|
|
||||||
Il contient les declarations de type, des defines relatif aux
|
|
||||||
fonctions d'emulation des interfaces du RRM (Radio Resource
|
|
||||||
Management ).
|
|
||||||
|
|
||||||
\author BURLOT Pascal
|
|
||||||
|
|
||||||
\date 15/07/08
|
|
||||||
|
|
||||||
|
|
||||||
\par Historique:
|
|
||||||
$Author$ $Date$ $Revision$
|
|
||||||
$Id$
|
|
||||||
$Log$
|
|
||||||
|
|
||||||
*******************************************************************************
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
#ifndef EMUL_INTERFACE_H
|
|
||||||
#define EMUL_INTERFACE_H
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
extern pthread_mutex_t cmm_transact_exclu;
|
|
||||||
extern pthread_mutex_t rrc_transact_exclu;
|
|
||||||
|
|
||||||
extern unsigned int cmm_transaction;
|
|
||||||
extern unsigned int rrc_transaction;
|
|
||||||
|
|
||||||
extern pthread_mutex_t actdiff_exclu;
|
|
||||||
extern actdiff_t *list_actdiff;
|
|
||||||
extern unsigned int cnt_actdiff;
|
|
||||||
|
|
||||||
extern transact_t *cmm_transact_list;
|
|
||||||
extern transact_t *rrc_transact_list;
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif /* EMUL_INTERFACE_H */
|
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -1,31 +0,0 @@
|
|||||||
CCC = gcc
|
|
||||||
|
|
||||||
|
|
||||||
OPENAIR3_DIR = ../../../openair3
|
|
||||||
OPENAIR2_DIR = ../../../openair2
|
|
||||||
|
|
||||||
OPENAIR3_MESH_RRM_GRAPH = $(OPENAIR3_DIR)/MESH/RRM/GRAPH
|
|
||||||
OPENAIR3_MESH_RRM = $(OPENAIR3_DIR)/MESH/RRM
|
|
||||||
OPENAIR3_MESH = $(OPENAIR3_DIR)/MESH
|
|
||||||
|
|
||||||
GRAPH_OBJS = graph_sock.o
|
|
||||||
|
|
||||||
OBJ += $(GRAPH_OBJS)
|
|
||||||
|
|
||||||
CFLAGS += -DOPENAIR2_IN -DUSER_MODE
|
|
||||||
|
|
||||||
all: graph
|
|
||||||
$(OBJ) : %.o : %.c
|
|
||||||
$(CC) -c $(CFLAGS) -I$(OPENAIR2_DIR) -I$(OPENAIR3_MESH) -I$(OPENAIR3_MESH_RRM) -I$(OPENAIR3_MESH_RRM_GRAPH) -o $@ $<
|
|
||||||
|
|
||||||
graph : $(OBJ) graph_int.c
|
|
||||||
$(CC) graph_int.c -o graph -I$(OPENAIR2_DIR) -I$(OPENAIR3_MESH) -I$(OPENAIR3_MESH_RRM) -I$(OPENAIR3_MESH_RRM_GRAPH) $(CFLAGS) $(OBJ)
|
|
||||||
clean :
|
|
||||||
rm -rf *.o
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Binary file not shown.
@@ -1,196 +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 graph_enum.h
|
|
||||||
|
|
||||||
\brief Fichier d'entete contenant les declarations des types, des defines ,
|
|
||||||
et des fonctions relatives aux messages RRC-RRM ou RRC-RRCI.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
\author IACOBELLI Lorenzo
|
|
||||||
|
|
||||||
\date 20/04/10
|
|
||||||
|
|
||||||
\par Historique:
|
|
||||||
|
|
||||||
|
|
||||||
*******************************************************************************
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef __GRAPH_ENUM_H
|
|
||||||
#define __GRAPH_ENUM_H
|
|
||||||
|
|
||||||
//mod_lor_10_05_12++
|
|
||||||
|
|
||||||
/*! \brief SENDORA scenario active: flags to set at the beginning of the simulation
|
|
||||||
*/
|
|
||||||
#define WSN 1 ///if wsn = 0 -> secondary network, else sensor network
|
|
||||||
#define SCEN_1 1
|
|
||||||
#define SCEN_2_CENTR 0
|
|
||||||
#define SCEN_2_DISTR 0
|
|
||||||
#define COLL_CLUST 0 //mod_lor_10_11_04
|
|
||||||
|
|
||||||
//mod_lor_10_05_12--*/
|
|
||||||
|
|
||||||
#define BTS_ID -1 //put -1 in case we are not in SCEN_1
|
|
||||||
#define FC_ID -1
|
|
||||||
#define CH_COLL_ID -1
|
|
||||||
#define NB_SENS_MAX 4
|
|
||||||
#define FIRST_SENSOR_ID 0
|
|
||||||
#define FIRST_SECOND_CLUSTER_USER_ID 5 //add_lor_11_01_06
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief Enumeration des messages entre RRM/RRCI et le RRC
|
|
||||||
*/
|
|
||||||
typedef enum {
|
|
||||||
SNS_UPDATE_SENS , ///< Message SENSING->RRM : update of the sensing information measured by the nodes
|
|
||||||
RRM_SCAN_ORD , ///< Message RRM->SENSING : order to scann indicated channels
|
|
||||||
RRM_END_SCAN_ORD , ///< Message RRM->SENSING : end of a scanning process in sensors
|
|
||||||
SNS_END_SCAN_CONF , ///< Message SENSING->RRC : end of a scanning process in sensors
|
|
||||||
NB_MSG_SNS_RRM ///< Nombre de message RRM-SENSING
|
|
||||||
}
|
|
||||||
MSG_SENSING_RRM_T ;
|
|
||||||
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief Enumeration des messages entre RRM/RRCI et le RRC
|
|
||||||
*/
|
|
||||||
typedef enum {
|
|
||||||
RRM_RB_ESTABLISH_REQ = 0 , ///< Message RRM->RRC : requete d'etablissement d'un RB
|
|
||||||
RRC_RB_ESTABLISH_RESP , ///< Message RRC->RRM : reponse d'etablissement d'un RB
|
|
||||||
RRC_RB_ESTABLISH_CFM , ///< Message RRC->RRM : confirmation d'etablissement d'un RB
|
|
||||||
RRM_RB_MODIFY_REQ , ///< Message RRM->RRC : requete de modification d'un RB
|
|
||||||
RRC_RB_MODIFY_RESP , ///< Message RRC->RRM : reponse de modification d'un RB
|
|
||||||
RRC_RB_MODIFY_CFM , ///< Message RRC->RRM : confirmation de modification d'un RB
|
|
||||||
RRM_RB_RELEASE_REQ , ///< Message RRM->RRC : requete de liberation d'un RB
|
|
||||||
RRC_RB_RELEASE_RESP , ///< Message RRC->RRM : reponse de liberation d'un RB
|
|
||||||
RRC_MR_ATTACH_IND , ///< Message RRC->RRM : indication d'attachement d'un MR
|
|
||||||
RRM_SENSING_MEAS_REQ , ///< Message RRM->RRC : requete de configuration de mesure sensing
|
|
||||||
RRC_SENSING_MEAS_RESP , ///< Message RRC->RRM : reponse de configuration de mesure sensing
|
|
||||||
RRC_CX_ESTABLISH_IND , ///< Message RRC->RRM : indication de connexion etablie
|
|
||||||
RRC_PHY_SYNCH_TO_MR_IND , ///< Message RRC->RRM : indication de synchronisation physique a un MR
|
|
||||||
RRC_PHY_SYNCH_TO_CH_IND , ///< Message RRC->RRM : indication de synchronisation physique a un CH
|
|
||||||
RRCI_CX_ESTABLISH_RESP , ///< Message RRCI->RRC : reponse de connexion etablie
|
|
||||||
RRC_SENSING_MEAS_IND , ///< Message RRC->RRM : indication de nouvel mesure de sensing
|
|
||||||
RRM_SENSING_MEAS_RESP , ///< Message RRM->RRC : reponse a l'indication de nouvel mesure de sensing
|
|
||||||
RRC_RB_MEAS_IND , ///< Message RRC->RRM : indication de nouvel mesure sur un RB
|
|
||||||
RRM_RB_MEAS_RESP , ///< Message RRM->RRC : reponse a l'indication de nouvel mesure sur un RB
|
|
||||||
RRM_INIT_CH_REQ , ///< Message RRM->RRC : init d'un CH
|
|
||||||
RRCI_INIT_MR_REQ , ///< Message RRM->RRC : init d'un MR
|
|
||||||
RRM_INIT_MON_REQ , ///< Message RRM->RRC : initiation of a scanning monitoring
|
|
||||||
RRM_INIT_SCAN_REQ , ///< Message RRM->RRC : initiation of a scanning process
|
|
||||||
RRC_INIT_SCAN_REQ , ///< Message RRC->RRM : initiation of a scanning process
|
|
||||||
//UPDATE_SENS_RESULTS_3 , ///< Message IP : update to send to CH/FC //mod_lor_10_01_25
|
|
||||||
RRM_END_SCAN_REQ , ///< Message RRM->RRC : end of a scanning process
|
|
||||||
RRC_END_SCAN_REQ , ///< Message RRC->RRM : end of a scanning process
|
|
||||||
RRC_END_SCAN_CONF , ///< Message RRC->RRM : end of a scanning process ack
|
|
||||||
RRC_INIT_MON_REQ , ///< Message IP : initiation of a scanning monitoring
|
|
||||||
RRM_UP_FREQ_ASS , ///< Message RRM->RRC : BTS assigns channels to SUs
|
|
||||||
RRM_END_SCAN_CONF , ///< Message RRM->RRC : end of a scanning process
|
|
||||||
RRC_UP_FREQ_ASS , ///< Message RRC->RRM ://mod_lor_10_06_04
|
|
||||||
RRM_UP_FREQ_ASS_SEC , ///< Message RRM->RRC : CH assigns channels to SUs (scen2) //add_lor_10_11_05
|
|
||||||
RRC_UP_FREQ_ASS_SEC , ///< Message RRC->RRM : frequencies assigned by CH (scen2) //add_lor_10_11_05
|
|
||||||
NB_MSG_RRC_RRM ///< Nombre de message RRM-RRC
|
|
||||||
|
|
||||||
} MSG_RRC_RRM_T ;
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief Enumeration des messages entre le RRM/RRCI et le CMM
|
|
||||||
*/
|
|
||||||
typedef enum {
|
|
||||||
CMM_CX_SETUP_REQ = 0 , ///< Message CMM->RRM : requete de configuration d'une connexion
|
|
||||||
RRM_CX_SETUP_CNF , ///< Message RRM->CMM : confirmation de configuration d'une connexion
|
|
||||||
CMM_CX_MODIFY_REQ , ///< Message CMM->RRM : requete de modification d'une connexion
|
|
||||||
RRM_CX_MODIFY_CNF , ///< Message RRM->CMM : confirmation de modification d'une connexion
|
|
||||||
CMM_CX_RELEASE_REQ , ///< Message CMM->RRM : requete de liberation d'une connexion
|
|
||||||
RRM_CX_RELEASE_CNF , ///< Message RRM->CMM : confirmation de liberation d'une connexion
|
|
||||||
CMM_CX_RELEASE_ALL_REQ , ///< Message CMM->RRM : requete de liberation de toutes les connexions
|
|
||||||
RRM_CX_RELEASE_ALL_CNF , ///< Message RRM->CMM : confirmation de liberation de toutes les connexions
|
|
||||||
RRCI_ATTACH_REQ , ///< Message RRCI->CMM : requete de d'attachement d'un MR
|
|
||||||
RRM_ATTACH_IND , ///< Message RRM->CMM : indicateur d'attachement d'un MR
|
|
||||||
CMM_ATTACH_CNF , ///< Message CMM->RRM : confirmation d'attachement d'un MR
|
|
||||||
RRM_MR_ATTACH_IND , ///< Message RRM->CMM : indicateur d'attachement d'un MR
|
|
||||||
ROUTER_IS_CH_IND , ///< Message RRM->CMM : indicateur que le noeud est un cluster head
|
|
||||||
RRCI_CH_SYNCH_IND , ///< Message RRCI->CMM : indicateur que le noeud est synchronise sur un CH
|
|
||||||
CMM_INIT_MR_REQ , ///< Message CMM->RRM : requete d'initialisation de l'attachement d'un MR
|
|
||||||
RRM_MR_SYNCH_IND , ///< Message RRM->CMM : indicateur que le noeud est synchronise sur un MR
|
|
||||||
RRM_NO_SYNCH_IND , ///< Message RRM->CMM : indicateur que le noeud n'est pas synchronise sur un CH ou MR
|
|
||||||
CMM_INIT_CH_REQ , ///< Message CMM->RRM : requete d'initialisation d'un CH
|
|
||||||
CMM_INIT_SENSING , ///< Message CMM->RRM : requete d'initialisation du sensing
|
|
||||||
CMM_STOP_SENSING , ///< Message CMM->RRM : requete de stop du sensing
|
|
||||||
CMM_ASK_FREQ , ///< Message CMM->RRM : in BTS, message to start an open freq. query
|
|
||||||
CMM_NEED_TO_TX , ///< Message CMM->RRM : in SU, second scenario centr, message to start an open freq. query
|
|
||||||
CMM_INIT_COLL_SENSING , ///< Message CMM->RRM : requete d'initialisation du sensing collaborative //add_lor_10_11_08
|
|
||||||
CMM_USER_DISC , ///< Message CMM->RRM : user disconnected -> delete all active com //add_lor_10_11_08
|
|
||||||
CMM_LINK_DISC , ///< Message CMM->RRM : stop comm -> delete an active link //add_lor_10_11_08
|
|
||||||
NB_MSG_CMM_RRM ///< Nombre de message de l'interface
|
|
||||||
} MSG_CMM_RRM_T ;
|
|
||||||
//mod_lor_10_04_27++
|
|
||||||
typedef enum {
|
|
||||||
UPDATE_SENS_RESULTS_3 = 0 , ///< Message IP : update to send to CH/FC //mod_lor_10_01_25
|
|
||||||
OPEN_FREQ_QUERY_4 , ///< Message IP : BTS to ask free frequencies to FC
|
|
||||||
UPDATE_OPEN_FREQ_7 , ///< Message IP : list of frequencies usable by the secondary network
|
|
||||||
UPDATE_SN_OCC_FREQ_5 , ///< Message IP : BTS sends used freq. to FC
|
|
||||||
INIT_COLL_SENS_REQ , ///< Message IP : CH1 sends request to start collaboration to CH2
|
|
||||||
STOP_COLL_SENS , ///< Message IP : CH1 sends order to stop collaboration to CH2
|
|
||||||
UP_CLUST_SENS_RESULTS , ///< Message IP : update to send to CH from CH_COLL
|
|
||||||
STOP_COLL_SENS_CONF , ///< Message IP : CH2 sends confirmationof stop collaboration to CH1
|
|
||||||
ASK_FREQ_TO_CH_3 , ///< Message IP : user that wants to transmits ask channels to CH
|
|
||||||
USER_DISCONNECT_9 , ///< Message IP : user wants to disconnect
|
|
||||||
CLOSE_LINK , ///< Message IP : user wants to stop a link
|
|
||||||
NB_MSG_IP ///< Nombre de message IP
|
|
||||||
} MSG_IP_T ;
|
|
||||||
//mod_lor_10_04_27--
|
|
||||||
|
|
||||||
typedef enum {
|
|
||||||
SNS=0,
|
|
||||||
RRC,
|
|
||||||
CMM,
|
|
||||||
IP, //mod_lor_10_04_27
|
|
||||||
NB_INTERF
|
|
||||||
} INTERF_T;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#endif /* GRAPH_ENUM_H */
|
|
||||||
@@ -1,887 +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 graph_int.c
|
|
||||||
|
|
||||||
\brief Emulation des interfaces du RRM (Radio Ressource Manager )
|
|
||||||
|
|
||||||
Cette application d'envoyer des stimuli sur les interfaces RRM:
|
|
||||||
- RRC -> RRM
|
|
||||||
- CMM -> RRM
|
|
||||||
|
|
||||||
\author IACOBELLI Lorenzo
|
|
||||||
|
|
||||||
\date 20/04/10
|
|
||||||
|
|
||||||
|
|
||||||
\par Historique:
|
|
||||||
L.IACOBELLI 2009-10-19
|
|
||||||
+ new messages
|
|
||||||
L.IACOBELLI 2010-04-15
|
|
||||||
+ add sensing unit emulation
|
|
||||||
|
|
||||||
*******************************************************************************
|
|
||||||
*/
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <errno.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <unistd.h>
|
|
||||||
#include <ctype.h>
|
|
||||||
|
|
||||||
#include <sys/socket.h>
|
|
||||||
#include <sys/un.h>
|
|
||||||
|
|
||||||
#include <pthread.h>
|
|
||||||
#include <time.h>
|
|
||||||
|
|
||||||
#include "graph_sock.h"
|
|
||||||
//#include "rrm_sock.h"
|
|
||||||
#include "graph_int.h"
|
|
||||||
#include "graph_enum.h"
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#define msg_fct printf
|
|
||||||
#define msg printf
|
|
||||||
|
|
||||||
|
|
||||||
sock_rrm_t S_graph;
|
|
||||||
static int flag_not_exit = 1 ;
|
|
||||||
static int SN_active = 0;
|
|
||||||
//mod_lor_10_04_21++
|
|
||||||
typedef struct {
|
|
||||||
unsigned int NB_chan ; //!< Number of channels
|
|
||||||
unsigned int NB_val ; //!< Number of values
|
|
||||||
unsigned int channels[3*NB_SENS_MAX]; //!< Vector of channels
|
|
||||||
unsigned int values[3*NB_SENS_MAX] ; //!< Vector of values
|
|
||||||
|
|
||||||
} gen_sens_info_t ;
|
|
||||||
//mod_lor_10_04_21--
|
|
||||||
|
|
||||||
int rrm_xface_init(int rrm_inst)
|
|
||||||
{
|
|
||||||
|
|
||||||
int sock ;
|
|
||||||
printf("[CRRM_XFACE] init de l'interface ");
|
|
||||||
sleep(3);
|
|
||||||
|
|
||||||
if(open_socket(&S_graph, RRM_SOCK_PATH, RRM_SOCK_PATH,rrm_inst)==-1)
|
|
||||||
return (-1);
|
|
||||||
|
|
||||||
if (S_graph.s == -1) {
|
|
||||||
printf("ciao");
|
|
||||||
return (-1);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
printf("Graphical Interface Connected... CRRM of node %d on socket %d\n",rrm_inst, S_graph.s);
|
|
||||||
return 0 ;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
main(int argc,char **argv)
|
|
||||||
{
|
|
||||||
int c = 0;
|
|
||||||
int rrm_inst=-1;
|
|
||||||
|
|
||||||
while ((c = getopt(argc,argv,"i:")) != -1)
|
|
||||||
switch (c) {
|
|
||||||
case 'i':
|
|
||||||
rrm_inst=atoi(optarg);
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
exit(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
//mod_lor_10_04_21++
|
|
||||||
//int colorbg;
|
|
||||||
int colorfg;
|
|
||||||
int colorBTS_msg = 30;
|
|
||||||
int colorfree=2;
|
|
||||||
int colorbusy=9;
|
|
||||||
int comments=88;//mod_lor_10_04_22
|
|
||||||
int i,j;
|
|
||||||
|
|
||||||
if (rrm_inst == FC_ID) {
|
|
||||||
//colorbg = 223;
|
|
||||||
colorfg = 21;
|
|
||||||
//dbg_color++
|
|
||||||
/*for (i=0; i<256; i++){
|
|
||||||
printf("\e[38;5;%dm",i);
|
|
||||||
printf("%d ",i);
|
|
||||||
|
|
||||||
}//dbg_color--*/
|
|
||||||
} else if (rrm_inst == BTS_ID ||((rrm_inst == CH_COLL_ID || rrm_inst >= FIRST_SECOND_CLUSTER_USER_ID )&& SCEN_2_CENTR)) { //mod_lor_10_05_12 AAA
|
|
||||||
//colorbg = 103;
|
|
||||||
colorfg = 11;
|
|
||||||
}
|
|
||||||
|
|
||||||
else {
|
|
||||||
//colorbg = 223;
|
|
||||||
colorfg = 21;
|
|
||||||
}
|
|
||||||
|
|
||||||
printf("\e[38;5;%dm",colorfg); //mod_lor_10_04_21
|
|
||||||
printf("MAIN Graphical Interface Connected\n");
|
|
||||||
|
|
||||||
rrm_xface_init(rrm_inst);
|
|
||||||
msg_head_t *Header ;
|
|
||||||
char *Data;
|
|
||||||
unsigned short Data_to_read;
|
|
||||||
|
|
||||||
while (1) {
|
|
||||||
Header = (msg_head_t *) recv_msg(&S_graph) ;
|
|
||||||
|
|
||||||
if (Header == NULL) {
|
|
||||||
break;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
//mod_lor_10_04_21++
|
|
||||||
Data_to_read=Header->size;
|
|
||||||
|
|
||||||
if (Data_to_read > 0 ) {
|
|
||||||
Data = (char *) (Header +1) ;
|
|
||||||
}
|
|
||||||
|
|
||||||
//mod_lor_10_04_21--
|
|
||||||
INTERF_T msg_interf;
|
|
||||||
int msg_type = Header->msg_type;
|
|
||||||
|
|
||||||
if (Header->msg_type<NB_MSG_SNS_RRM)
|
|
||||||
msg_interf=SNS;
|
|
||||||
else if ((msg_type-=NB_MSG_SNS_RRM)< NB_MSG_RRC_RRM)
|
|
||||||
msg_interf=RRC;
|
|
||||||
else if ((msg_type-=NB_MSG_RRC_RRM)< NB_MSG_CMM_RRM)
|
|
||||||
msg_interf=CMM;
|
|
||||||
else if ((msg_type-=NB_MSG_CMM_RRM)< NB_MSG_IP)
|
|
||||||
msg_interf=IP;
|
|
||||||
else {
|
|
||||||
printf("Error! Unknown message %d!!!\n",Header->msg_type);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
// msg("Got MSG of Type %d on Inst %d\n",Header->msg_type,Header->inst);
|
|
||||||
switch ( msg_interf ) {
|
|
||||||
case SNS: {
|
|
||||||
switch ( msg_type ) {
|
|
||||||
case SNS_UPDATE_SENS : { //mod_lor_10_06_02
|
|
||||||
msg_fct( "[SENSING]>[CRRM]:UPDATE_SENSING_RESULTS number %d \n",(Header->Trans_id - 4096)) ;
|
|
||||||
gen_sens_info_t *p = (gen_sens_info_t *)Data ;
|
|
||||||
printf("\e[38;5;%dm",comments); //mod_lor_10_04_22
|
|
||||||
msg_fct( "Sensing information received from sensing unit about frequencies from\n");
|
|
||||||
//msg_fct( "Results about frequencies from ");
|
|
||||||
printf("\e[38;5;%dm",colorfree);
|
|
||||||
msg_fct( "%d ",(p->channels[0]/1000));
|
|
||||||
printf("\e[38;5;%dm",comments);
|
|
||||||
msg_fct( "MHz and ");
|
|
||||||
printf("\e[38;5;%dm",colorfree);
|
|
||||||
msg_fct( "%d ",(p->channels[1]/1000));
|
|
||||||
printf("\e[38;5;%dm",comments);
|
|
||||||
msg_fct( "MHz\nBandwidth of analyzed subbands: ");
|
|
||||||
printf("\e[38;5;%dm",colorfree);
|
|
||||||
msg_fct( "%d ",p->values[0]);
|
|
||||||
printf("\e[38;5;%dm",comments);
|
|
||||||
msg_fct( "KHz\n");
|
|
||||||
msg_fct( "Updating of local sensing database with recived data ...\n");
|
|
||||||
|
|
||||||
//mod_lor_10_04_21++
|
|
||||||
|
|
||||||
/*for (i=0;i<p->NB_chan;i++){ //com_lor_10_11_09
|
|
||||||
if(p->values[i]==1){
|
|
||||||
printf("\e[38;5;%dm",colorfree); //mod_lor_10_04_21
|
|
||||||
msg_fct( " Channel %d: no primary user detected\n",p->channels[i]);
|
|
||||||
//printf("\e[38;5;%dm",colorfg); //mod_lor_10_04_21
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
printf("\e[38;5;%dm",colorbusy); //mod_lor_10_04_21
|
|
||||||
msg_fct( " Channel %d: primary user detected\n",p->channels[i]);
|
|
||||||
//printf("\e[38;5;%dm",colorfg); //mod_lor_10_04_21
|
|
||||||
}
|
|
||||||
}*/
|
|
||||||
printf("\e[38;5;%dm",comments); //mod_lor_10_04_22*/
|
|
||||||
|
|
||||||
if (SCEN_1)//mod_lor_10_05_12++
|
|
||||||
msg_fct( "Trasmission of the new information to the Fusion Center\n");
|
|
||||||
else
|
|
||||||
msg_fct( "Trasmission of the new information to the Cluster Head\n");//mod_lor_10_05_12--
|
|
||||||
|
|
||||||
msg_fct( "Waiting for next sensing update ...\n");
|
|
||||||
printf("\e[38;5;%dm",colorfg); //mod_lor_10_04_21
|
|
||||||
//mod_lor_10_04_21--
|
|
||||||
|
|
||||||
}
|
|
||||||
break ;
|
|
||||||
|
|
||||||
case SNS_END_SCAN_CONF : {
|
|
||||||
|
|
||||||
msg_fct( "[SENSING]>[CRRM]:END_SENSING_CONFIRMATION\n");
|
|
||||||
printf("\e[38;5;%dm",comments); //mod_lor_10_04_22
|
|
||||||
|
|
||||||
if (SCEN_1)//mod_lor_10_05_12++
|
|
||||||
msg_fct( "Sending confirmation of stopped sensing to Fusion Center ...\n");
|
|
||||||
else
|
|
||||||
msg_fct( "Sending confirmation of stopped sensing to Cluster Head ...\n");//mod_lor_10_05_12--
|
|
||||||
|
|
||||||
printf("\e[38;5;%dm",colorfg);
|
|
||||||
}
|
|
||||||
break ;
|
|
||||||
|
|
||||||
default :
|
|
||||||
msg("[SNS]WARNING: msg unknown %d switched as %d\n",Header->msg_type,msg_type) ;
|
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
case RRC: {
|
|
||||||
switch ( msg_type ) {
|
|
||||||
case RRC_RB_ESTABLISH_RESP: {
|
|
||||||
msg_fct( "[CRRC]>[CRRM]:%d:RRC_RB_ESTABLISH_RESP \n",Header->inst);
|
|
||||||
|
|
||||||
}
|
|
||||||
break ;
|
|
||||||
|
|
||||||
case RRC_RB_ESTABLISH_CFM: {
|
|
||||||
|
|
||||||
msg_fct( "[CRRC]>[CRRM]:%d:RRC_RB_ESTABLISH_CFM \n",Header->inst);
|
|
||||||
/*if (Header->inst == BTS_ID && SCEN_1){//mod_lor_10_05_12
|
|
||||||
printf("\e[38;5;%dm",comments); //mod_lor_10_04_22
|
|
||||||
msg_fct( "******************************************************************\n");
|
|
||||||
msg_fct( "Link between Fusion Center and BTS opened\n");
|
|
||||||
msg_fct( "******************************************************************\n");
|
|
||||||
printf("\e[38;5;%dm",colorfg); //mod_lor_10_04_22
|
|
||||||
}*/
|
|
||||||
|
|
||||||
}
|
|
||||||
break ;
|
|
||||||
|
|
||||||
case RRC_RB_MODIFY_RESP: {
|
|
||||||
msg_fct( "[CRRC]>[CRRM]:%d:RRC_RB_MODIFY_RESP \n",Header->inst);
|
|
||||||
|
|
||||||
}
|
|
||||||
break ;
|
|
||||||
|
|
||||||
case RRC_RB_MODIFY_CFM: {
|
|
||||||
|
|
||||||
msg_fct( "[CRRC]>[CRRM]:%d:RRC_RB_MODIFY_CFM\n",Header->inst);
|
|
||||||
|
|
||||||
}
|
|
||||||
break ;
|
|
||||||
|
|
||||||
case RRC_RB_RELEASE_RESP: {
|
|
||||||
msg_fct( "[CRRC]>[CRRM]:%d:RRC_RB_RELEASE_RESP \n",Header->inst);
|
|
||||||
|
|
||||||
}
|
|
||||||
break ;
|
|
||||||
|
|
||||||
case RRC_MR_ATTACH_IND : {
|
|
||||||
|
|
||||||
msg_fct( "[CRRC]>[CRRM]:%d:RRC_MR_ATTACH_IND \n",Header->inst);
|
|
||||||
|
|
||||||
}
|
|
||||||
break ;
|
|
||||||
|
|
||||||
case RRC_SENSING_MEAS_RESP: {
|
|
||||||
msg_fct( "[CRRC]>[CRRM]:%d:RRC_SENSING_MEAS_RESP \n",Header->inst);
|
|
||||||
}
|
|
||||||
break ;
|
|
||||||
|
|
||||||
case RRC_CX_ESTABLISH_IND: {
|
|
||||||
|
|
||||||
msg_fct( "[CRRC]>[CRRM]:%d:RRC_CX_ESTABLISH_IND \n",Header->inst);
|
|
||||||
|
|
||||||
}
|
|
||||||
break ;
|
|
||||||
|
|
||||||
case RRC_PHY_SYNCH_TO_MR_IND : {
|
|
||||||
|
|
||||||
msg_fct( "[CRRC]>[CRRM]:%d:RRC_PHY_SYNCH_TO_MR_IND.... \n",Header->inst);
|
|
||||||
|
|
||||||
}
|
|
||||||
break ;
|
|
||||||
|
|
||||||
case RRC_PHY_SYNCH_TO_CH_IND : {
|
|
||||||
msg_fct( "[CRRC]>[CRRM]:%d:RRC_PHY_SYNCH_TO_CH_IND.... \n",Header->inst);
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
break ;
|
|
||||||
|
|
||||||
case RRC_SENSING_MEAS_IND : {
|
|
||||||
|
|
||||||
msg_fct( "[CRRC]>[CRRM]:%d:RRC_SENSING_MEAS_IND \n",Header->inst);
|
|
||||||
|
|
||||||
}
|
|
||||||
break ;
|
|
||||||
|
|
||||||
case RRC_RB_MEAS_IND : {
|
|
||||||
|
|
||||||
msg_fct( "[CRRC]>[CRRM]:%d:RRC_RB_MEAS_IND \n",Header->inst);
|
|
||||||
}
|
|
||||||
break ;
|
|
||||||
|
|
||||||
|
|
||||||
case RRC_INIT_SCAN_REQ : {
|
|
||||||
msg_fct( "[CRRC]>[CRRM]:START_SENSING_REQUEST\n");
|
|
||||||
printf("\e[38;5;%dm",comments); //mod_lor_10_04_22
|
|
||||||
|
|
||||||
if (SCEN_1)//mod_lor_10_05_12++
|
|
||||||
msg_fct( "Order to start sensing activity received from Fusion Center\n");
|
|
||||||
else
|
|
||||||
msg_fct( "Order to start sensing activity received from Cluster Head\n");//mod_lor_10_05_12--
|
|
||||||
|
|
||||||
msg_fct( "Activation of sensing unit ...\n");
|
|
||||||
msg_fct( "Waiting for sensing results ...\n");
|
|
||||||
printf("\e[38;5;%dm",colorfg); //mod_lor_10_04_22
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
break ;
|
|
||||||
|
|
||||||
case RRC_END_SCAN_CONF : {
|
|
||||||
|
|
||||||
msg_fct( "[CRRC]>[CRRM]:END_SENSINS_ACTIVITY_CONFIRMATION\n");
|
|
||||||
printf("\e[38;5;%dm",comments); //mod_lor_10_04_22
|
|
||||||
|
|
||||||
if (SCEN_1)//mod_lor_10_05_12++
|
|
||||||
msg_fct( "Sensor %d confirms the end of sensing activity\n",(Header->inst -FIRST_SENSOR_ID+ 1));
|
|
||||||
else
|
|
||||||
msg_fct( "Secondary User %d confirms the end of sensing activity\n",(Header->inst -FIRST_SENSOR_ID+ 1));//mod_lor_10_05_12--
|
|
||||||
|
|
||||||
printf("\e[38;5;%dm",colorfg); //mod_lor_10_04_22
|
|
||||||
}
|
|
||||||
break ;
|
|
||||||
|
|
||||||
case RRC_END_SCAN_REQ : {
|
|
||||||
|
|
||||||
msg_fct( "[CRRC]>[CRRM]:END_SENSINS_ACTIVITY_REQUEST\n");
|
|
||||||
printf("\e[38;5;%dm",comments); //mod_lor_10_04_22
|
|
||||||
|
|
||||||
if (SCEN_1)//mod_lor_10_05_12++
|
|
||||||
msg_fct( "Order to stop sensing activity received from Fusion Center\n");
|
|
||||||
else
|
|
||||||
msg_fct( "Order to stop sensing activity received from Cluster Head\n");//mod_lor_10_05_12--
|
|
||||||
|
|
||||||
msg_fct( "Command to stop sensing activity transmitted to sensing unit\n");
|
|
||||||
msg_fct( "Waiting for confirmation from sensing unit ...\n");
|
|
||||||
printf("\e[38;5;%dm",colorfg); //mod_lor_10_04_22
|
|
||||||
|
|
||||||
}
|
|
||||||
break ;
|
|
||||||
|
|
||||||
case RRC_INIT_MON_REQ : {
|
|
||||||
msg_fct( "[CRRC]>[CRRM]:RRC_INIT_MON_REQ \n",Header->inst);
|
|
||||||
}
|
|
||||||
break ;
|
|
||||||
|
|
||||||
case RRC_UP_FREQ_ASS : {
|
|
||||||
gen_sens_info_t *p = (gen_sens_info_t *)Data ;
|
|
||||||
msg_fct( "[CRRC]>[CRRM]:UPDATE_FREQUENCIES_ASSIGNED\n",Header->inst);
|
|
||||||
|
|
||||||
if (p->NB_chan!=0) {
|
|
||||||
printf("\e[38;5;%dm",comments);
|
|
||||||
msg_fct( "Channel to use: from ");
|
|
||||||
printf("\e[38;5;%dm",colorfree);
|
|
||||||
msg_fct( "%d ",(p->channels[0]));
|
|
||||||
printf("\e[38;5;%dm",comments);
|
|
||||||
msg_fct( "KHz to ");
|
|
||||||
printf("\e[38;5;%dm",colorfree);
|
|
||||||
msg_fct( "%d ",(p->channels[1]));
|
|
||||||
printf("\e[38;5;%dm",comments);
|
|
||||||
msg_fct( "KHz\n");
|
|
||||||
printf("\e[38;5;%dm",colorfg);
|
|
||||||
} else {
|
|
||||||
printf("\e[38;5;%dm",colorbusy);
|
|
||||||
msg_fct( "No channels available\n");
|
|
||||||
printf("\e[38;5;%dm",colorfg);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
case RRC_UP_FREQ_ASS_SEC : { //add_lor_10_11_09
|
|
||||||
gen_sens_info_t *p = (gen_sens_info_t *)Data ;
|
|
||||||
msg_fct( "[CRRC]>[CRRM]:UPDATE_FREQUENCIES_ASSIGNED_SEC \n",Header->inst);
|
|
||||||
|
|
||||||
for (i=0; i<p->NB_val; i++) {
|
|
||||||
if (p->values[i]) {
|
|
||||||
printf("\e[38;5;%dm",comments);
|
|
||||||
msg_fct( "Transmitting on channel from ");
|
|
||||||
printf("\e[38;5;%dm",colorfree);
|
|
||||||
msg_fct( "%d ",(p->channels[i*2]));
|
|
||||||
printf("\e[38;5;%dm",comments);
|
|
||||||
msg_fct( "KHz to ");
|
|
||||||
printf("\e[38;5;%dm",colorfree);
|
|
||||||
msg_fct( "%d ",(p->channels[(i*2)+1]));
|
|
||||||
printf("\e[38;5;%dm",comments);
|
|
||||||
msg_fct( "KHz\n");
|
|
||||||
printf("\e[38;5;%dm",colorfg);
|
|
||||||
} else {
|
|
||||||
printf("\e[38;5;%dm",comments);
|
|
||||||
msg_fct( "Receiving on channel from ");
|
|
||||||
printf("\e[38;5;%dm",colorfree);
|
|
||||||
msg_fct( "%d ",(p->channels[i*2]));
|
|
||||||
printf("\e[38;5;%dm",comments);
|
|
||||||
msg_fct( "KHz to ");
|
|
||||||
printf("\e[38;5;%dm",colorfree);
|
|
||||||
msg_fct( "%d ",(p->channels[(i*2)+1]));
|
|
||||||
printf("\e[38;5;%dm",comments);
|
|
||||||
msg_fct( "KHz\n");
|
|
||||||
printf("\e[38;5;%dm",colorfg);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break ;
|
|
||||||
|
|
||||||
default :
|
|
||||||
msg("[CRRC]WARNING: msg unknown %d switched as %d\n",Header->msg_type,msg_type) ;
|
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
case IP: {
|
|
||||||
switch ( msg_type ) {
|
|
||||||
|
|
||||||
case UPDATE_SENS_RESULTS_3 : { //mod_lor_10_06_02
|
|
||||||
gen_sens_info_t *p = (gen_sens_info_t *)Data ;
|
|
||||||
|
|
||||||
if (SCEN_1) { //mod_lor_10_05_12++
|
|
||||||
msg_fct( "[SENSOR %d msg]:UPDATE_SENSING_MEASUREMENT\n",(Header->inst-FIRST_SENSOR_ID+1));
|
|
||||||
printf("\e[38;5;%dm",comments); //mod_lor_10_04_22
|
|
||||||
msg_fct( "Sensing information received from sensor %d (local update number: %d)\n",(Header->inst-FIRST_SENSOR_ID+1),(Header->Trans_id - 4096));
|
|
||||||
} else {
|
|
||||||
msg_fct( "[S.U. %d msg]:UPDATE_SENSING_MEASUREMENT\n",(Header->inst-FIRST_SENSOR_ID+1));
|
|
||||||
printf("\e[38;5;%dm",comments); //mod_lor_10_04_22
|
|
||||||
msg_fct( "Sensing information received from Secondary User %d (local update number: %d)\n",(Header->inst-FIRST_SENSOR_ID+1),(Header->Trans_id - 4096));
|
|
||||||
}//mod_lor_10_05_12--
|
|
||||||
|
|
||||||
msg_fct( "Sensing results about frequencies from ");
|
|
||||||
printf("\e[38;5;%dm",colorfree);
|
|
||||||
msg_fct( "%d ",(p->channels[0]/1000));
|
|
||||||
printf("\e[38;5;%dm",comments);
|
|
||||||
msg_fct( "MHz and ");
|
|
||||||
printf("\e[38;5;%dm",colorfree);
|
|
||||||
msg_fct( "%d ",(p->channels[1]/1000));
|
|
||||||
printf("\e[38;5;%dm",comments);
|
|
||||||
msg_fct( "MHz\nUpdating of sensing database using recived data ...\n");
|
|
||||||
|
|
||||||
/*if(SN_active &&p->values[1]!=3){ //comm_lor_10_11_09
|
|
||||||
msg_fct( "Checking if frequencies in use by Secondary Network are still free ...\n");
|
|
||||||
if(p->values[1]==1){
|
|
||||||
printf("\e[38;5;%dm",colorbusy);
|
|
||||||
printf("Primary detected on frequencies in use by Secondary Network\n");
|
|
||||||
printf("\e[38;5;%dm",comments);
|
|
||||||
msg_fct( "Sending update of open frequencies to Secondary Network\n");
|
|
||||||
}
|
|
||||||
else if (p->values[1]==0){
|
|
||||||
printf("\e[38;5;%dm",colorfree);
|
|
||||||
printf("No primary communication detected on frequencies in use by Secondary Network\n");
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (p->values[1]==1){
|
|
||||||
printf("\e[38;5;%dm",comments);
|
|
||||||
msg_fct( "Sending update of open frequencies to Secondary Network\n");
|
|
||||||
}*/
|
|
||||||
//mod_lor_10_04_21++
|
|
||||||
/*
|
|
||||||
unsigned int up_to_send = 0;
|
|
||||||
for (i=(p->NB_chan-1);i>=0;i--){
|
|
||||||
if(p->values[i]==1){
|
|
||||||
printf("\e[38;5;%dm",colorfree); //mod_lor_10_04_21
|
|
||||||
msg_fct( " Channel %d: no primary user detected\n",p->channels[i]);
|
|
||||||
}else{
|
|
||||||
printf("\e[38;5;%dm",colorbusy); //mod_lor_10_04_21
|
|
||||||
msg_fct( " Channel %d: primary user detected\n",p->channels[i]);
|
|
||||||
if(p->values[i]==3){
|
|
||||||
up_to_send = 1;
|
|
||||||
msg_fct( " -> Channel used by SN\n");
|
|
||||||
msg_fct( " -> Need to send update of open frequencies\n");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (up_to_send){
|
|
||||||
printf("\e[38;5;%dm",comments); //mod_lor_10_04_22
|
|
||||||
msg_fct( "Sending update of open frequencies to Secondary Network\n");
|
|
||||||
}*/
|
|
||||||
printf("\e[38;5;%dm",colorfg); //mod_lor_10_04_21
|
|
||||||
//mod_lor_10_04_21--
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
break ;
|
|
||||||
|
|
||||||
case OPEN_FREQ_QUERY_4 : {
|
|
||||||
printf("\e[38;5;%dm",colorBTS_msg); //mod_lor_10_04_23
|
|
||||||
msg_fct( "[BTS msg]:OPEN_FREQUENCIES_QUERY \n");
|
|
||||||
printf("\e[38;5;%dm",comments); //mod_lor_10_04_23
|
|
||||||
msg_fct( "Received a request from the secondary network BTS to know the available frequencies to use\n");
|
|
||||||
msg_fct( "Sending to BTS information about available frequencies\n");
|
|
||||||
printf("\e[38;5;%dm",colorfg); //mod_lor_10_04_23
|
|
||||||
|
|
||||||
}
|
|
||||||
break ;
|
|
||||||
|
|
||||||
case ASK_FREQ_TO_CH_3 : { //add_lor_10_11_03
|
|
||||||
gen_sens_info_t *p = (gen_sens_info_t *)Data ;
|
|
||||||
|
|
||||||
if (p->NB_val==0) {
|
|
||||||
msg_fct( "[SU %d msg]:ASK_FREQUENCIES \n", Header->inst);
|
|
||||||
printf("\e[38;5;%dm",comments); //mod_lor_10_04_23
|
|
||||||
msg_fct( "Received a request from secondary user #%d to have a channel to communicate with Secondary User #%d\n",Header->inst,p->channels[0]);
|
|
||||||
msg_fct( "Looking for available channels...\n");
|
|
||||||
printf("\e[38;5;%dm",colorfg); //mod_lor_10_04_23
|
|
||||||
} else {
|
|
||||||
printf("\e[38;5;%dm",comments); //mod_lor_10_04_23
|
|
||||||
msg_fct( "None channel is available...\n");
|
|
||||||
msg_fct( "Saving channel request...\n");
|
|
||||||
printf("\e[38;5;%dm",colorfg); //mod_lor_10_04_23
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
break ;
|
|
||||||
|
|
||||||
case UPDATE_OPEN_FREQ_7 : { //mod_lor_10_06_02
|
|
||||||
gen_sens_info_t *p = (gen_sens_info_t *)Data ;
|
|
||||||
msg_fct( "[FC msg]:UPDATE_OPEN_FREQUENCIES\n",Header->inst);
|
|
||||||
printf("\e[38;5;%dm",comments); //mod_lor_10_04_23
|
|
||||||
msg_fct( "Received information about available frequencies from Fusion Center\n");
|
|
||||||
|
|
||||||
if (p->NB_chan==0) {
|
|
||||||
printf("\e[38;5;%dm",colorbusy);
|
|
||||||
msg_fct( "No available channels for Secondary Network \n");
|
|
||||||
} else {
|
|
||||||
msg_fct( "Updating of channel database ...\n");
|
|
||||||
|
|
||||||
for (i=(p->NB_chan-1); i>=0; i--) {
|
|
||||||
printf("\e[38;5;%dm",colorfree); //mod_lor_10_04_21
|
|
||||||
msg_fct( " Channel from %d KHz to %d KHz is available\n",p->channels[i-1], p->channels[i]);
|
|
||||||
i=i-2;
|
|
||||||
}
|
|
||||||
|
|
||||||
printf("\e[38;5;%dm",comments); //mod_lor_10_04_23
|
|
||||||
msg_fct( "Selection of frequencies for Secondary network ...\n");
|
|
||||||
|
|
||||||
//mod_lor_10_05_18++
|
|
||||||
for (i=(p->NB_val-1); i>=0; i--) {
|
|
||||||
for (j=(p->NB_chan-3); j>=0; j=j-3) {
|
|
||||||
if (p->channels[j]==p->values[i]) {
|
|
||||||
printf("\e[38;5;%dm",colorfree);
|
|
||||||
msg_fct( " Channel from %d KHz to %d KHz selected for SN\n",p->channels[j+1],p->channels[j+2]);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
printf("\e[38;5;%dm",comments); //mod_lor_10_04_23
|
|
||||||
//mod_lor_10_05_18--
|
|
||||||
msg_fct( "Sending update of frequencies used by Secondary Network to Fusion Center ...\n");
|
|
||||||
printf("\e[38;5;%dm",colorfg); //mod_lor_10_04_23
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
break ;
|
|
||||||
|
|
||||||
case UPDATE_SN_OCC_FREQ_5 : { //mod_lor_10_06_02
|
|
||||||
gen_sens_info_t *p = (gen_sens_info_t *)Data ;
|
|
||||||
|
|
||||||
if (p->NB_chan>0)
|
|
||||||
SN_active = 1; //mod_lor_10_06_02
|
|
||||||
|
|
||||||
printf("\e[38;5;%dm",colorBTS_msg); //mod_lor_10_04_23
|
|
||||||
msg_fct( "[BTS msg]:UPDATE_SN_OCCUPIED_FREQUENCIES\n", Header->inst);
|
|
||||||
printf("\e[38;5;%dm",comments); //mod_lor_10_04_22
|
|
||||||
msg_fct( "Update received from BTS about frequencies used by Secondary Network\n");
|
|
||||||
msg_fct( "Updating CHANNEL DATABASE :\n");
|
|
||||||
|
|
||||||
if (p->NB_chan == 0) {
|
|
||||||
msg_fct( "SN did not select any channel\n");
|
|
||||||
SN_active = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
//printf("\e[38;5;%dm",colorBTS_msg);
|
|
||||||
for (i=0; i<p->NB_chan; i++) {
|
|
||||||
printf("\e[38;5;%dm",comments);
|
|
||||||
msg_fct( " Channel from " );
|
|
||||||
printf("\e[38;5;%dm",colorfree);
|
|
||||||
msg_fct( "%d ",p->channels[i] );
|
|
||||||
printf("\e[38;5;%dm",comments);
|
|
||||||
msg_fct( "MHz to");
|
|
||||||
printf("\e[38;5;%dm",colorfree);
|
|
||||||
msg_fct( " %d ",p->channels[++i] );
|
|
||||||
printf("\e[38;5;%dm",comments);
|
|
||||||
msg_fct( " used by Secondary Network\n" );
|
|
||||||
}
|
|
||||||
|
|
||||||
if (p->values[0]) {
|
|
||||||
if (p->NB_chan != 0) {
|
|
||||||
printf("\e[38;5;%dm",colorbusy);
|
|
||||||
msg_fct( " -> Channels in use by SN are not available anymore!\n");
|
|
||||||
printf("\e[38;5;%dm",comments);
|
|
||||||
}
|
|
||||||
|
|
||||||
msg_fct( "Sending update of open frequencies to BTS ...\n");
|
|
||||||
}
|
|
||||||
|
|
||||||
printf("\e[38;5;%dm",colorfg); //mod_lor_10_04_23
|
|
||||||
|
|
||||||
}
|
|
||||||
break ;
|
|
||||||
|
|
||||||
//mod_lor_10_05_10++
|
|
||||||
case INIT_COLL_SENS_REQ : {
|
|
||||||
msg_fct( "******************************************************************\n");
|
|
||||||
msg_fct( "[CH 1 msg]:INIT_COLL_SENS_REQ from %d\n", Header->inst);
|
|
||||||
printf("\e[38;5;%dm",comments); //mod_lor_10_04_22
|
|
||||||
msg_fct( "Request from another cluster to collaborate in sensing operations\n");
|
|
||||||
msg_fct( "Sending sensing parameters to sensors connected ...\n");
|
|
||||||
printf("\e[38;5;%dm",colorfg); //mod_lor_10_04_23
|
|
||||||
|
|
||||||
}
|
|
||||||
break ;
|
|
||||||
|
|
||||||
case STOP_COLL_SENS : {
|
|
||||||
msg_fct( "[CH 1 msg]:STOP_COLL_SENS from %d\n", Header->inst);
|
|
||||||
printf("\e[38;5;%dm",comments); //mod_lor_10_04_22
|
|
||||||
msg_fct( "Request to stop the collaboration in sensing operations\n");
|
|
||||||
msg_fct( "Sending stop sensing order to sensors connected ...\n");
|
|
||||||
printf("\e[38;5;%dm",colorfg); //mod_lor_10_04_23
|
|
||||||
|
|
||||||
}
|
|
||||||
break ;
|
|
||||||
|
|
||||||
case STOP_COLL_SENS_CONF : {
|
|
||||||
printf("\e[38;5;%dm",colorBTS_msg); //mod_lor_10_04_23
|
|
||||||
msg_fct( "[CH coll msg]:STOP_COLL_SENS_CONF from %d\n", Header->inst);
|
|
||||||
printf("\e[38;5;%dm",comments); //mod_lor_10_04_22
|
|
||||||
msg_fct( "Collaborative Cluster Head confirms the end of sensing activity\n");
|
|
||||||
printf("\e[38;5;%dm",colorfg); //mod_lor_10_04_23
|
|
||||||
|
|
||||||
}
|
|
||||||
break ;
|
|
||||||
|
|
||||||
case UP_CLUST_SENS_RESULTS : {
|
|
||||||
gen_sens_info_t *p = (gen_sens_info_t *)Data ;
|
|
||||||
printf("\e[38;5;%dm",colorBTS_msg); //mod_lor_10_04_23
|
|
||||||
msg_fct( "[CH coll msg]:UP_CLUST_SENS_RESULTS from %d\n", Header->inst);
|
|
||||||
printf("\e[38;5;%dm",comments); //mod_lor_10_04_22
|
|
||||||
msg_fct( "Update received from collaborative Cluster about frequencies from\n");
|
|
||||||
printf("\e[38;5;%dm",colorfree);
|
|
||||||
msg_fct( "%d ",(p->channels[0]/1000));
|
|
||||||
printf("\e[38;5;%dm",comments);
|
|
||||||
msg_fct( "MHz and ");
|
|
||||||
printf("\e[38;5;%dm",colorfree);
|
|
||||||
msg_fct( "%d ",(p->channels[1]/1000));
|
|
||||||
printf("\e[38;5;%dm",comments);
|
|
||||||
msg_fct( "MHz\nBandwidth of analyzed subbands: ");
|
|
||||||
printf("\e[38;5;%dm",colorfree);
|
|
||||||
msg_fct( "%d ",p->values[0]);
|
|
||||||
printf("\e[38;5;%dm",comments);
|
|
||||||
msg_fct( "KHz\n");
|
|
||||||
msg_fct( "Updating of sensing database using recived data...\n");
|
|
||||||
printf("\e[38;5;%dm",colorfg);
|
|
||||||
}
|
|
||||||
break ;
|
|
||||||
|
|
||||||
//mod_lor_10_05_10--
|
|
||||||
case USER_DISCONNECT_9 : { //add_lor_10_11_09
|
|
||||||
msg_fct( "[SU %d msg]:USER_DISCONNECTION\n", Header->inst);
|
|
||||||
printf("\e[38;5;%dm",comments); //mod_lor_10_04_22
|
|
||||||
msg_fct( "Secondary User %d wants to interrupt all its current communications.\n", Header->inst);
|
|
||||||
msg_fct( "Sending update to all Secondary Users\n");
|
|
||||||
printf("\e[38;5;%dm",colorfg); //mod_lor_10_04_23
|
|
||||||
|
|
||||||
}
|
|
||||||
break ;
|
|
||||||
|
|
||||||
case CLOSE_LINK : { //add_lor_10_11_09
|
|
||||||
gen_sens_info_t *p = (gen_sens_info_t *)Data ;
|
|
||||||
int i;
|
|
||||||
msg_fct( "[SU %d msg]:CLOSE_LINK\n", Header->inst);
|
|
||||||
printf("\e[38;5;%dm",comments); //mod_lor_10_04_22
|
|
||||||
msg_fct( "Secondary User %d wants to close communication channel from user %d to user %d\n", Header->inst, p->channels[0],p->values[0]);
|
|
||||||
msg_fct( "Sending update to all Secondary Users\n");
|
|
||||||
printf("\e[38;5;%dm",colorfg); //mod_lor_10_04_23
|
|
||||||
}
|
|
||||||
break ;
|
|
||||||
|
|
||||||
default :
|
|
||||||
msg("[IP]WARNING: msg unknown %d switched as %d\n",Header->msg_type,msg_type) ;
|
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
case CMM: {
|
|
||||||
switch ( msg_type ) {
|
|
||||||
case CMM_CX_SETUP_REQ: {
|
|
||||||
|
|
||||||
msg_fct( "[CMM]>[CRRM]:%d:CMM_CX_SETUP_REQ\n",Header->inst);
|
|
||||||
|
|
||||||
}
|
|
||||||
break ;
|
|
||||||
|
|
||||||
case CMM_CX_MODIFY_REQ: {
|
|
||||||
|
|
||||||
msg_fct( "[CMM]>[CRRM]:%d:CMM_CX_MODIFY_REQ\n",Header->inst);
|
|
||||||
|
|
||||||
}
|
|
||||||
break ;
|
|
||||||
|
|
||||||
case CMM_CX_RELEASE_REQ : {
|
|
||||||
|
|
||||||
msg_fct( "[CMM]>[CRRM]:%d:CMM_CX_RELEASE_REQ\n",Header->inst);
|
|
||||||
|
|
||||||
}
|
|
||||||
break ;
|
|
||||||
|
|
||||||
case CMM_CX_RELEASE_ALL_REQ : {
|
|
||||||
|
|
||||||
msg_fct( "[CMM]>[CRRM]:%d:CMM_CX_RELEASE_ALL_REQ\n",Header->inst);
|
|
||||||
|
|
||||||
}
|
|
||||||
break ;
|
|
||||||
|
|
||||||
case CMM_ATTACH_CNF : {
|
|
||||||
msg_fct( "[CMM]>[CRRM]:%d:CMM_ATTACH_CNF\n",Header->inst);
|
|
||||||
printf("\e[38;5;%dm",comments); //mod_lor_10_04_22
|
|
||||||
msg_fct( "******************************************************************\n");
|
|
||||||
|
|
||||||
//mod_lor_10_05_12++
|
|
||||||
if (SCEN_1) { //mod_lor_11_02_15++ : reorganization sendora scen 1
|
|
||||||
if (BTS_ID>=0 && FC_ID>=0)
|
|
||||||
msg_fct( "The sensor is now connected to the fusion center\n"); //AAA to fix
|
|
||||||
else if (BTS_ID>=0)
|
|
||||||
msg_fct( "Secondary User is now connected to the BTS\n");
|
|
||||||
else if (FC_ID>=0)
|
|
||||||
msg_fct( "The sensor is now connected to the fusion center\n");
|
|
||||||
}//mod_lor_11_02_15--
|
|
||||||
else if(SCEN_2_DISTR)
|
|
||||||
msg_fct( "Secondary User is now connected to Cluster Head\n");
|
|
||||||
else if(Header->inst < FIRST_SECOND_CLUSTER_USER_ID)
|
|
||||||
msg_fct( "Secondary User is now connected to Cluster Head #1\n");
|
|
||||||
else
|
|
||||||
msg_fct( "Secondary User is now connected to Cluster Head #2\n");//mod_lor_10_05_12--
|
|
||||||
|
|
||||||
msg_fct( "******************************************************************\n");
|
|
||||||
printf("\e[38;5;%dm",colorfg); //mod_lor_10_04_22
|
|
||||||
}
|
|
||||||
break ;
|
|
||||||
|
|
||||||
case CMM_INIT_MR_REQ : {
|
|
||||||
msg_fct( "[CMM]>[CRRM]:%d:CMM_INIT_MR_REQ \n",Header->inst);
|
|
||||||
|
|
||||||
}
|
|
||||||
break ;
|
|
||||||
|
|
||||||
case CMM_INIT_CH_REQ : {
|
|
||||||
msg_fct( "[CMM]>[CRRM]:%d:CMM_INIT_CH_REQ \n",Header->inst);
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
break ;
|
|
||||||
|
|
||||||
case CMM_INIT_SENSING : {
|
|
||||||
printf("\e[38;5;%dm",comments); //mod_lor_10_04_22
|
|
||||||
msg_fct( "******************************************************************\n");
|
|
||||||
printf("\e[38;5;%dm",colorfg); //mod_lor_10_04_22
|
|
||||||
msg_fct( "[CMM]>[CRRM]:START_SENSING\n");
|
|
||||||
printf("\e[38;5;%dm",comments); //mod_lor_10_04_22
|
|
||||||
msg_fct( "Order to activate sensing received \n");
|
|
||||||
|
|
||||||
if (SCEN_1)//mod_lor_10_05_12++
|
|
||||||
msg_fct( "Sending sensing parameters to sensors connected ...\n");
|
|
||||||
else
|
|
||||||
msg_fct( "Sending sensing parameters to Secondary Users connected ...\n");//mod_lor_10_05_12--
|
|
||||||
|
|
||||||
printf("\e[38;5;%dm",colorfg); //mod_lor_10_04_22
|
|
||||||
}
|
|
||||||
break ;
|
|
||||||
|
|
||||||
case CMM_STOP_SENSING : {
|
|
||||||
msg_fct( "[CMM]>[CRRM]:STOP_SENSING\n",Header->inst);
|
|
||||||
printf("\e[38;5;%dm",comments); //mod_lor_10_04_22
|
|
||||||
msg_fct( "Order to stop sensing operations received \n");
|
|
||||||
|
|
||||||
if (SCEN_1)//mod_lor_10_05_12++
|
|
||||||
msg_fct( "Sending order to stop sensing activity to sensors connected ...\n");
|
|
||||||
else {
|
|
||||||
if (SCEN_2_CENTR)
|
|
||||||
msg_fct( "Sending order to stop collaborative sensing to collaborative CH ...\n");
|
|
||||||
|
|
||||||
msg_fct( "Sending order to stop sensing actions to secondary users connected ...\n");
|
|
||||||
}//mod_lor_10_05_12--
|
|
||||||
|
|
||||||
sleep(1);
|
|
||||||
msg_fct( "Waiting for stop sensing confirmations ...\n");
|
|
||||||
printf("\e[38;5;%dm",colorfg); //mod_lor_10_04_22
|
|
||||||
|
|
||||||
}
|
|
||||||
break ;
|
|
||||||
|
|
||||||
case CMM_ASK_FREQ : {
|
|
||||||
printf("\e[38;5;%dm",comments); //mod_lor_10_04_22
|
|
||||||
msg_fct( "******************************************************************\n");
|
|
||||||
printf("\e[38;5;%dm",colorfg); //mod_lor_10_04_22
|
|
||||||
msg_fct( "[CMM]>[CRRM]:ASK_FOR_AVAILABLE_FREQUENCIES\n",Header->inst);
|
|
||||||
printf("\e[38;5;%dm",comments); //mod_lor_10_04_22
|
|
||||||
msg_fct( "Need of frequencies for secondary users \n");
|
|
||||||
msg_fct( "Sending request of available channels to Fusion Center ...\n");
|
|
||||||
sleep(1);
|
|
||||||
msg_fct( "Waiting for available channels information ...\n");
|
|
||||||
printf("\e[38;5;%dm",colorfg); //mod_lor_10_04_22
|
|
||||||
|
|
||||||
}
|
|
||||||
break ;
|
|
||||||
|
|
||||||
|
|
||||||
default :
|
|
||||||
msg("[CMM]WARNING: msg unknown %d switched as %d\n",Header->msg_type,msg_type) ;
|
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
default :
|
|
||||||
msg("[Graph_xface]WARNING: msg unknown %d switched as %d\n",Header->msg_type,msg_type) ;
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
close_socket(&S_graph) ;
|
|
||||||
}
|
|
||||||
@@ -1,67 +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 graph_int.h
|
|
||||||
|
|
||||||
\brief Fichier d'entête
|
|
||||||
|
|
||||||
Il contient les declarations de type, des defines relatif aux
|
|
||||||
fonctions d'emulation des interfaces du RRM (Radio Resource
|
|
||||||
Management ).
|
|
||||||
|
|
||||||
\author IACOBELLI Lorenzo
|
|
||||||
|
|
||||||
\date 20/04/10
|
|
||||||
|
|
||||||
|
|
||||||
\par Historique:
|
|
||||||
$Author$ $Date$ $Revision$
|
|
||||||
$Id$
|
|
||||||
$Log$
|
|
||||||
|
|
||||||
*******************************************************************************
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
#ifndef GRAPH_INT_H
|
|
||||||
#define GRAPH_INT_H
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif /* GRAPH_INT_H */
|
|
||||||
@@ -1,293 +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 sensing_rrm_interface.c
|
|
||||||
|
|
||||||
\brief Sensing unit sockets
|
|
||||||
|
|
||||||
\author IACOBELLI Lorenzo, KNOPP Raymond
|
|
||||||
|
|
||||||
\date 01/04/2010
|
|
||||||
|
|
||||||
|
|
||||||
\par Historique:
|
|
||||||
|
|
||||||
|
|
||||||
*******************************************************************************
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <errno.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <unistd.h>
|
|
||||||
|
|
||||||
#include <sys/socket.h>
|
|
||||||
#include <sys/un.h>
|
|
||||||
|
|
||||||
#include "graph_sock.h"
|
|
||||||
|
|
||||||
//! \brief Taille maximale de la charge utile
|
|
||||||
#define SIZE_MAX_PAYLOAD 2048
|
|
||||||
//! \brief PID de l'espace utilisateur (Netlink mode)
|
|
||||||
//#define PID_USERSPACE 0xAA
|
|
||||||
|
|
||||||
|
|
||||||
#define msg printf
|
|
||||||
#define RRM_FREE free
|
|
||||||
|
|
||||||
#ifndef SENSING_RRM_FIFOS_XFACE
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief This function opens a unix socket for the rrm communication
|
|
||||||
\return The return value is a socket handle
|
|
||||||
*/
|
|
||||||
int open_socket(
|
|
||||||
sock_rrm_t *s , ///< socket descriptor
|
|
||||||
char *path_local, ///< local socket path if unix socket
|
|
||||||
char *path_dest , ///< host Socket path if unix socket
|
|
||||||
int rrm_inst ///< instance of the rrm entity
|
|
||||||
)
|
|
||||||
{
|
|
||||||
/* Unix socket */
|
|
||||||
int socket_fd ;
|
|
||||||
int len ;
|
|
||||||
|
|
||||||
if ((socket_fd = socket(AF_UNIX, SOCK_DGRAM, 0)) == -1) {
|
|
||||||
perror("unix socket");
|
|
||||||
return -1 ;
|
|
||||||
}
|
|
||||||
|
|
||||||
memset(&(s->un_local_addr), 0, sizeof(struct sockaddr_un));
|
|
||||||
s->un_local_addr.sun_family = AF_UNIX;
|
|
||||||
sprintf(s->un_local_addr.sun_path,"%s%d", path_local, rrm_inst );
|
|
||||||
unlink(s->un_local_addr.sun_path);
|
|
||||||
msg("local %s\n",s->un_local_addr.sun_path);
|
|
||||||
len = strlen((s->un_local_addr).sun_path) + sizeof((s->un_local_addr).sun_family);
|
|
||||||
|
|
||||||
if (bind(socket_fd, (struct sockaddr *)&(s->un_local_addr), len) == -1) {
|
|
||||||
perror("bind");
|
|
||||||
return -1 ;
|
|
||||||
}
|
|
||||||
|
|
||||||
memset(&(s->un_dest_addr), 0, sizeof(struct sockaddr_un));
|
|
||||||
s->un_dest_addr.sun_family = AF_UNIX;
|
|
||||||
sprintf(s->un_dest_addr.sun_path,"%s%d", path_dest, rrm_inst );
|
|
||||||
msg("Dest %s\n",s->un_dest_addr.sun_path);
|
|
||||||
|
|
||||||
|
|
||||||
s->s = socket_fd ;
|
|
||||||
return socket_fd ;
|
|
||||||
}
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief This function closes a RRM socket
|
|
||||||
\return none
|
|
||||||
*/
|
|
||||||
void close_socket(
|
|
||||||
sock_rrm_t *sock ///< the socket handle
|
|
||||||
)
|
|
||||||
{
|
|
||||||
shutdown(sock->s, SHUT_RDWR);
|
|
||||||
close(sock->s);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief This function send a buffer message to the unix socket
|
|
||||||
\return if OK then "0" is returned else "-1"
|
|
||||||
*/
|
|
||||||
char BUFF[2048];
|
|
||||||
int send_msg_sock(
|
|
||||||
sock_rrm_t *s ,///< socket descriptor
|
|
||||||
msg_t *smsg ///< the message to send
|
|
||||||
)
|
|
||||||
{
|
|
||||||
/* Unix socket */
|
|
||||||
int ret = 0 ;
|
|
||||||
// char *buf = NULL;
|
|
||||||
struct msghdr msghd ;
|
|
||||||
struct iovec iov;
|
|
||||||
int taille = sizeof(msg_head_t) ;
|
|
||||||
|
|
||||||
if ( smsg == NULL )
|
|
||||||
return -1 ;
|
|
||||||
|
|
||||||
if ( smsg->data != NULL )
|
|
||||||
taille += smsg->head.size ;
|
|
||||||
|
|
||||||
//buf = RRM_MALLOC(char, taille);
|
|
||||||
//if (buf ==NULL)
|
|
||||||
//return -1 ;
|
|
||||||
|
|
||||||
memcpy( BUFF , &(smsg->head) , sizeof(msg_head_t) ) ;
|
|
||||||
memcpy( BUFF+sizeof(msg_head_t), smsg->data, smsg->head.size ) ;
|
|
||||||
|
|
||||||
iov.iov_base = (void *)BUFF;
|
|
||||||
iov.iov_len = taille ;
|
|
||||||
|
|
||||||
msghd.msg_name = (void *)&(s->un_dest_addr);
|
|
||||||
msghd.msg_namelen = sizeof(s->un_dest_addr);
|
|
||||||
msghd.msg_iov = &iov;
|
|
||||||
msghd.msg_iovlen = 1;
|
|
||||||
msghd.msg_control = NULL ;
|
|
||||||
msghd.msg_controllen = 0 ;
|
|
||||||
|
|
||||||
if ( sendmsg(s->s, &msghd, 0) < 0 ) {
|
|
||||||
ret = -1;
|
|
||||||
msg("socket %d, dest %s\n",s->s,s->un_dest_addr.sun_path);
|
|
||||||
perror("sendmsg:unix socket");
|
|
||||||
}
|
|
||||||
|
|
||||||
//RRM_FREE(buf) ;
|
|
||||||
//RRM_FREE(msg->data) ;
|
|
||||||
//RRM_FREE(msg) ;
|
|
||||||
|
|
||||||
return ret ;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief This function read a buffer from a unix socket
|
|
||||||
\return the function returns a message pointer. If the pointeur is NULL, a error
|
|
||||||
is happened.
|
|
||||||
*/
|
|
||||||
char *recv_msg(
|
|
||||||
sock_rrm_t *s ///< socket descriptor
|
|
||||||
)
|
|
||||||
{
|
|
||||||
/* Unix socket */
|
|
||||||
char *buf = NULL;
|
|
||||||
char *smsg = NULL;
|
|
||||||
struct msghdr msghd ;
|
|
||||||
struct iovec iov;
|
|
||||||
int size_msg ;
|
|
||||||
msg_head_t *head ;
|
|
||||||
int ret ;
|
|
||||||
|
|
||||||
int taille = SIZE_MAX_PAYLOAD ;
|
|
||||||
|
|
||||||
buf = (char *)calloc(taille,sizeof(char));
|
|
||||||
|
|
||||||
if ( buf == NULL ) {
|
|
||||||
fprintf(stderr,"Buf null\n");
|
|
||||||
return NULL ;
|
|
||||||
}
|
|
||||||
|
|
||||||
iov.iov_base = (void *)buf;
|
|
||||||
iov.iov_len = taille ;
|
|
||||||
msghd.msg_name = (void *)&(s->un_dest_addr);
|
|
||||||
msghd.msg_namelen = sizeof(s->un_dest_addr);
|
|
||||||
msghd.msg_iov = &iov;
|
|
||||||
msghd.msg_iovlen = 1;
|
|
||||||
msghd.msg_control = NULL ;
|
|
||||||
msghd.msg_controllen= 0 ;
|
|
||||||
|
|
||||||
ret = recvmsg(s->s, &msghd , 0 ) ;
|
|
||||||
|
|
||||||
if ( ret <= 0 ) {
|
|
||||||
// non-blocking socket
|
|
||||||
// perror("PB recvmsg_un");
|
|
||||||
fprintf(stderr,"PB recvmsg_un\n");
|
|
||||||
RRM_FREE(buf);
|
|
||||||
return NULL ;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (msghd.msg_flags != 0 ) {
|
|
||||||
fprintf(stderr,"error recvmsg_un: 0x%02x\n", msghd.msg_flags) ;
|
|
||||||
RRM_FREE(buf);
|
|
||||||
return NULL ;
|
|
||||||
}
|
|
||||||
|
|
||||||
head = (msg_head_t *) buf ;
|
|
||||||
size_msg = sizeof(msg_head_t) + head->size ;
|
|
||||||
|
|
||||||
smsg = (char *)calloc(size_msg,sizeof(char)) ;
|
|
||||||
|
|
||||||
if ( smsg != NULL )
|
|
||||||
memcpy( smsg , buf , size_msg ) ;
|
|
||||||
|
|
||||||
RRM_FREE( buf ) ;
|
|
||||||
|
|
||||||
return smsg ;
|
|
||||||
}
|
|
||||||
|
|
||||||
#else //XFACE
|
|
||||||
|
|
||||||
int send_msg_fifo(int *s, msg_t *fmsg)
|
|
||||||
{
|
|
||||||
int ret = 0, ret1;
|
|
||||||
int taille = sizeof(msg_head_t) ;
|
|
||||||
msg("write on fifos %d, msg %p\n",*s,fmsg);
|
|
||||||
|
|
||||||
if ( fmsg == NULL )
|
|
||||||
return -1 ;
|
|
||||||
|
|
||||||
// envoi le header
|
|
||||||
|
|
||||||
|
|
||||||
ret1 = rtf_put (*s,(char*) &(fmsg->head) , taille);
|
|
||||||
|
|
||||||
if(ret1 <0) {
|
|
||||||
msg("rtf_put H ERR %d\n",ret1);
|
|
||||||
rtf_reset(*s);
|
|
||||||
return ret1;
|
|
||||||
}
|
|
||||||
|
|
||||||
ret=ret1;
|
|
||||||
|
|
||||||
// envoi les datas si elles sont definis
|
|
||||||
if ( fmsg->data != NULL ) {
|
|
||||||
ret1 += rtf_put (*s,(char*) fmsg->data, fmsg->head.size);
|
|
||||||
|
|
||||||
if(ret1 <0) {
|
|
||||||
msg("rtf_put D ERR %d\n",ret1);
|
|
||||||
rtf_reset(*s);
|
|
||||||
return ret1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
ret+=ret1;
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif //XFACE
|
|
||||||
|
|
||||||
int send_msg(void *s, msg_t *smsg)
|
|
||||||
{
|
|
||||||
#ifdef USER_MODE
|
|
||||||
send_msg_sock((sock_rrm_t *)s, smsg);
|
|
||||||
#else
|
|
||||||
send_msg_fifo((int *)s,smsg);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,129 +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 sensing_rrm_interface.h
|
|
||||||
|
|
||||||
\brief Fichier d'entete contenant les declarations des types, des defines ,
|
|
||||||
et des fonctions relatives aux fonctions de communication.
|
|
||||||
|
|
||||||
\author IACOBELLI Lorenzo, KNOPP Raymond
|
|
||||||
|
|
||||||
\date 01/04/2010
|
|
||||||
|
|
||||||
|
|
||||||
\par Historique:
|
|
||||||
$Author$ $Date$ $Revision$
|
|
||||||
$Id$
|
|
||||||
$Log$
|
|
||||||
|
|
||||||
*******************************************************************************
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef __SENSING_RRM_INTERFACE_H__
|
|
||||||
#define __SENSING_RRM_INTERFACE_H__
|
|
||||||
|
|
||||||
|
|
||||||
//#ifdef SENSING_RRM_XFACE
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief Entete des messages de RRM/CMM/RRC/SENSING
|
|
||||||
*/
|
|
||||||
typedef struct {
|
|
||||||
unsigned short start ; ///< Identification du debut de message
|
|
||||||
unsigned char inst ; ///< Identification de l'instance RRM
|
|
||||||
unsigned char msg_type ; ///< Identification du type message
|
|
||||||
unsigned int size ; ///< taille du message
|
|
||||||
unsigned int Trans_id ; ///< Identification de la transaction
|
|
||||||
} msg_head_t ;
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief Definition de la structure d'un message a envoyer sur un socket:
|
|
||||||
- RRM->RRC
|
|
||||||
- RRC->RRM
|
|
||||||
- RRCI->RRC
|
|
||||||
- RRC->RRCI
|
|
||||||
- CMM->RRM
|
|
||||||
- RRM->CMM
|
|
||||||
*/
|
|
||||||
typedef struct {
|
|
||||||
msg_head_t head ; ///< entete du message
|
|
||||||
char *data ; ///< message
|
|
||||||
} msg_t ;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#define RRM_SOCK_PATH "/tmp/rrm_socket"
|
|
||||||
#define TO_RRM_SOCK_PATH "/tmp/to_rrm_socket"
|
|
||||||
|
|
||||||
//! \brief Identification of the RRM/CMM/RRC message begin
|
|
||||||
#define START_MSG 0xA533
|
|
||||||
//! \brief Identification of the PUSU message begin
|
|
||||||
#define START_MSG_PUSU 0xCC
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#include <sys/socket.h>
|
|
||||||
#include <sys/un.h>
|
|
||||||
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief Definition de la structure definissant le socket pour envoyer les messages
|
|
||||||
*/
|
|
||||||
typedef struct {
|
|
||||||
int s ; ///< identification du socket
|
|
||||||
struct sockaddr_un un_local_addr ; ///< Adresse local si unix socket
|
|
||||||
struct sockaddr_un un_dest_addr ; ///< Adresse destinataire si unix socket
|
|
||||||
} sock_rrm_t ;
|
|
||||||
|
|
||||||
|
|
||||||
/* *** Fonctions relatives aux interfaces CMM ou SENSING *** */
|
|
||||||
|
|
||||||
int open_socket( sock_rrm_t *s ,char *path_local, char *path_dest , int rrm_inst ) ;
|
|
||||||
void close_socket(sock_rrm_t *sock ) ;
|
|
||||||
int send_msg_sock(sock_rrm_t *s ,msg_t *msg ) ;
|
|
||||||
char *recv_msg( sock_rrm_t *s ) ;
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
#endif
|
|
||||||
@@ -1,142 +0,0 @@
|
|||||||
include $(OPENAIR_DIR)/common/utils/Makefile.inc
|
|
||||||
OSTYPE = $(shell uname -o )
|
|
||||||
|
|
||||||
#AAA: if rrc emulated remove comment from next line
|
|
||||||
#EMUL_RRC = 1
|
|
||||||
#AAA: if sns emulated remove comment from next line
|
|
||||||
#EMUL_SNS = 1
|
|
||||||
RRC_KERNEL_MODE = 0
|
|
||||||
|
|
||||||
|
|
||||||
#VPATH =.:./deps:./obj
|
|
||||||
# en ABSOLU pour utiliser les tags avec nedit de n'importe ou
|
|
||||||
CHEMIN = $(shell pwd)
|
|
||||||
OPENAIR1_DIR= $(CHEMIN)/../../../openair1
|
|
||||||
OPENAIR2_DIR= $(CHEMIN)/../../../openair2
|
|
||||||
OPENAIR2_RRC= $(OPENAIR2_DIR)/RRC/MESH/
|
|
||||||
OPENAIR1_SENSING= $(OPENAIR1_DIR)/USERSPACE_TOOLS/SENDORA
|
|
||||||
OPENAIR3_RRM= $(CHEMIN)
|
|
||||||
INTERFACE = $(CHEMIN)/..
|
|
||||||
EMUL = $(CHEMIN)/EMUL
|
|
||||||
VPATH = $(CHEMIN):$(EMUL):$(CHEMIN)/deps:$(CHEMIN)/obj
|
|
||||||
|
|
||||||
INCLUDE = -I. -I$(OPENAIR2_RRC) -I$(OPENAIR3_RRM) -I$(INTERFACE) -I$(OPENAIR2_DIR) -I$(OPENAIR1_SENSING)
|
|
||||||
CFLAGS += -std=gnu99 $(INCLUDE) -DDEBUG -DNOTRACE -DOPENAIR2_IN
|
|
||||||
LDFLAGS = -lm -lforms -lX11 -L/usr/X11R6/lib -lXpm -lpthread
|
|
||||||
|
|
||||||
ifeq ($(OSTYPE),Cygwin)
|
|
||||||
|
|
||||||
LDFLAGS += -lpthread
|
|
||||||
CFLAGS += -DCYGWIN
|
|
||||||
|
|
||||||
else
|
|
||||||
|
|
||||||
LDFLAGS += -lpthread -lrt
|
|
||||||
CFLAGS += -DLINUX
|
|
||||||
|
|
||||||
endif
|
|
||||||
|
|
||||||
# ifdef RRC_KERNEL_MODE
|
|
||||||
ifeq ($(RRC_KERNEL_MODE),1)
|
|
||||||
CFLAGS += -DRRC_KERNEL_MODE
|
|
||||||
endif
|
|
||||||
|
|
||||||
TARGET = emul_int rrm
|
|
||||||
|
|
||||||
#put rrm_graph.c instead of rrm.c to connect the graphic interface block to the rrm
|
|
||||||
SRC = rrm_graph.c
|
|
||||||
SRC += rrm_sock.c
|
|
||||||
SRC += rrm_util.c
|
|
||||||
SRC += rrm_2_rrc_msg.c
|
|
||||||
SRC += cmm_msg.c
|
|
||||||
SRC += pusu_msg.c
|
|
||||||
SRC += transact.c
|
|
||||||
SRC += rrm_constant.c
|
|
||||||
SRC += ch_init.c
|
|
||||||
SRC += mr_attach.c
|
|
||||||
SRC += rb_mngt.c
|
|
||||||
SRC += neighbor_db.c
|
|
||||||
SRC += rb_db.c
|
|
||||||
SRC += sens_db.c
|
|
||||||
SRC += channels_db.c
|
|
||||||
SRC += msg_mngt.c
|
|
||||||
SRC += sens_op.c
|
|
||||||
SRC += freq_ass_op.c
|
|
||||||
SRC += rrm_2_sensing_msg.c
|
|
||||||
SRC += ip_msg.c
|
|
||||||
SRC += sensing_form.c
|
|
||||||
SRC += SN_freq_form.c
|
|
||||||
SRC += sens_scen_2_form.c
|
|
||||||
SRC += all_freq_to_users_form.c
|
|
||||||
SRC += sens_CH1_scen_2.c
|
|
||||||
SRC += sens_sensor.c
|
|
||||||
|
|
||||||
SRC_EMUL = emul_interface.c
|
|
||||||
SRC_EMUL += rrm_sock.c
|
|
||||||
SRC_EMUL += rrm_util.c
|
|
||||||
SRC_EMUL += cmm_msg.c
|
|
||||||
SRC_EMUL += pusu_msg.c
|
|
||||||
SRC_EMUL += transact.c
|
|
||||||
SRC_EMUL += actdiff.c
|
|
||||||
|
|
||||||
#ifeq ($(EMUL_RRC),0)
|
|
||||||
ifndef EMUL_RRC
|
|
||||||
CFLAGS += -DPHY_EMUL
|
|
||||||
else
|
|
||||||
CFLAGS += -DRRC_EMUL
|
|
||||||
SRC_EMUL += rrc_2_rrm_msg.c
|
|
||||||
SRC_EMUL += scenario.c
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifdef EMUL_SNS
|
|
||||||
CFLAGS += -DSNS_EMUL
|
|
||||||
SRC_EMUL += sensing_2_rrm_msg.c
|
|
||||||
endif
|
|
||||||
|
|
||||||
OBJ = $(SRC:%.c=./obj/%.o)
|
|
||||||
OBJ_EMUL = $(SRC_EMUL:%.c=./obj/%.o)
|
|
||||||
|
|
||||||
DEP = $(SRC:%.c=./deps/%.d) $(SRC_EMUL:%.c=./deps/%.d)
|
|
||||||
|
|
||||||
all : Makefile deps $(TARGET)
|
|
||||||
|
|
||||||
emul_int: $(OBJ_EMUL)
|
|
||||||
@echo '=============================='
|
|
||||||
@echo "Linkage $@ ($(OSTYPE))"
|
|
||||||
@echo '------------------------------'
|
|
||||||
$(CC) -o $@ $^ $(LDFLAGS)
|
|
||||||
|
|
||||||
rrm: $(OBJ)
|
|
||||||
@echo '=============================='
|
|
||||||
@echo "Linkage $@ ($(OSTYPE))"
|
|
||||||
@echo '------------------------------'
|
|
||||||
$(CC) -o $@ $^ $(LDFLAGS)
|
|
||||||
|
|
||||||
deps/%.d : %.c
|
|
||||||
@echo '------------------------------'
|
|
||||||
@echo Dependance $@
|
|
||||||
@echo '------------------------------'
|
|
||||||
$(CC) $(CFLAGS) -M -MM $< | sed -e "1s/^/obj\//" -e "s/: /: Makefile /" > $@
|
|
||||||
|
|
||||||
obj/%.o:%.c
|
|
||||||
@echo '------------------------------'
|
|
||||||
@echo Compilation $@
|
|
||||||
@echo '------------------------------'
|
|
||||||
@echo Dependance $^
|
|
||||||
@echo Dependance plus recente $?
|
|
||||||
$(CC) $(CFLAGS) -c -o $@ $<
|
|
||||||
|
|
||||||
|
|
||||||
-include deps/*.d
|
|
||||||
|
|
||||||
.PHONY: clean cleanexe deps
|
|
||||||
|
|
||||||
deps: $(DEP)
|
|
||||||
|
|
||||||
clean:
|
|
||||||
rm -f $(TARGET) $(OBJ) *.o obj/*.o tags deps/*.d *.stackdump
|
|
||||||
|
|
||||||
cleanexe:
|
|
||||||
rm -f *.exe
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1,53 +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
|
|
||||||
|
|
||||||
*******************************************************************************/
|
|
||||||
/* Form definition file generated with fdesign. */
|
|
||||||
|
|
||||||
#include "forms.h"
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include "SN_freq_form.h"
|
|
||||||
|
|
||||||
FD_Secondary_Network_frequencies *create_form_Secondary_Network_frequencies(void)
|
|
||||||
{
|
|
||||||
FL_OBJECT *obj;
|
|
||||||
FD_Secondary_Network_frequencies *fdui = (FD_Secondary_Network_frequencies *) fl_calloc(1, sizeof(*fdui));
|
|
||||||
|
|
||||||
fdui->Secondary_Network_frequencies = fl_bgn_form(FL_NO_BOX, 620, 200);
|
|
||||||
obj = fl_add_box(FL_UP_BOX,0,0,620,200,"");
|
|
||||||
fdui->Selected_frequencies = obj = fl_add_xyplot(FL_IMPULSE_XYPLOT,70,50,500,100,"Selected_frequencies");
|
|
||||||
fl_set_object_color(obj,FL_BLACK,FL_GREEN);
|
|
||||||
fl_set_object_lsize(obj,FL_NORMAL_SIZE);
|
|
||||||
fl_end_form();
|
|
||||||
|
|
||||||
fdui->Secondary_Network_frequencies->fdui = fdui;
|
|
||||||
|
|
||||||
return fdui;
|
|
||||||
}
|
|
||||||
/*---------------------------------------*/
|
|
||||||
|
|
||||||
@@ -1,52 +0,0 @@
|
|||||||
Magic: 13000
|
|
||||||
|
|
||||||
Internal Form Definition File
|
|
||||||
(do not change)
|
|
||||||
|
|
||||||
Number of forms: 1
|
|
||||||
Unit of measure: FL_COORD_PIXEL
|
|
||||||
|
|
||||||
=============== FORM ===============
|
|
||||||
Name: Secondary_Network_frequencies
|
|
||||||
Width: 590
|
|
||||||
Height: 230
|
|
||||||
Number of Objects: 2
|
|
||||||
|
|
||||||
--------------------
|
|
||||||
class: FL_BOX
|
|
||||||
type: UP_BOX
|
|
||||||
box: 0 0 590 230
|
|
||||||
boxtype: FL_UP_BOX
|
|
||||||
colors: FL_COL1 FL_COL1
|
|
||||||
alignment: FL_ALIGN_CENTER
|
|
||||||
style: FL_NORMAL_STYLE
|
|
||||||
size: FL_DEFAULT_SIZE
|
|
||||||
lcol: FL_BLACK
|
|
||||||
label:
|
|
||||||
shortcut:
|
|
||||||
resize: FL_RESIZE_ALL
|
|
||||||
gravity: FL_NoGravity FL_NoGravity
|
|
||||||
name:
|
|
||||||
callback:
|
|
||||||
argument:
|
|
||||||
|
|
||||||
--------------------
|
|
||||||
class: FL_XYPLOT
|
|
||||||
type: NORMAL_XYPLOT
|
|
||||||
box: 60 40 490 120
|
|
||||||
boxtype: FL_FLAT_BOX
|
|
||||||
colors: FL_BLACK FL_GREEN
|
|
||||||
alignment: FL_ALIGN_BOTTOM
|
|
||||||
style: FL_NORMAL_STYLE
|
|
||||||
size: FL_TINY_SIZE
|
|
||||||
lcol: FL_BLACK
|
|
||||||
label:
|
|
||||||
shortcut:
|
|
||||||
resize: FL_RESIZE_ALL
|
|
||||||
gravity: FL_NoGravity FL_NoGravity
|
|
||||||
name: Selected_frequencies
|
|
||||||
callback:
|
|
||||||
argument:
|
|
||||||
|
|
||||||
==============================
|
|
||||||
create_the_forms
|
|
||||||
@@ -1,49 +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
|
|
||||||
|
|
||||||
*******************************************************************************/
|
|
||||||
|
|
||||||
/** Header file generated with fdesign on Tue Jun 1 09:25:58 2010.**/
|
|
||||||
|
|
||||||
#ifndef FD_Secondary_Network_frequencies_h_
|
|
||||||
#define FD_Secondary_Network_frequencies_h_
|
|
||||||
|
|
||||||
/** Callbacks, globals and object handlers **/
|
|
||||||
|
|
||||||
|
|
||||||
/**** Forms and Objects ****/
|
|
||||||
typedef struct {
|
|
||||||
FL_FORM *Secondary_Network_frequencies;
|
|
||||||
void *vdata;
|
|
||||||
char *cdata;
|
|
||||||
long ldata;
|
|
||||||
FL_OBJECT *Selected_frequencies;
|
|
||||||
} FD_Secondary_Network_frequencies;
|
|
||||||
|
|
||||||
extern FD_Secondary_Network_frequencies * create_form_Secondary_Network_frequencies(void);
|
|
||||||
|
|
||||||
#endif /* FD_Secondary_Network_frequencies_h_ */
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
*-18,000000 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1
|
|
||||||
@28
|
|
||||||
instance
|
|
||||||
transaction
|
|
||||||
CMM-->RRM
|
|
||||||
RRM-->CCM
|
|
||||||
RRM-->RRC
|
|
||||||
RRC-->RRM
|
|
||||||
RRM-->PUSU
|
|
||||||
PUSU-->RRM
|
|
||||||
@@ -1,46 +0,0 @@
|
|||||||
#
|
|
||||||
# sample .gtkwaverc file that works fine with verilog xl
|
|
||||||
#
|
|
||||||
hier_max_level 1
|
|
||||||
dynamic_resizing 1
|
|
||||||
use_maxtime_display 0
|
|
||||||
|
|
||||||
enable_vcd_autosave 0
|
|
||||||
use_roundcaps 1
|
|
||||||
|
|
||||||
use_nonprop_fonts yes
|
|
||||||
enable_horiz_grid yes
|
|
||||||
use_big_fonts no
|
|
||||||
constant_marker_update yes
|
|
||||||
show_grid yes
|
|
||||||
show_base_symbols no
|
|
||||||
use_roundcaps yes
|
|
||||||
|
|
||||||
atomic_vectors yes
|
|
||||||
vcd_explicit_zero_subscripts no
|
|
||||||
|
|
||||||
|
|
||||||
#
|
|
||||||
# color additions
|
|
||||||
#
|
|
||||||
color_back 000000
|
|
||||||
color_grid 808070
|
|
||||||
color_high 00ff00
|
|
||||||
color_low 00ffff
|
|
||||||
color_trans 00ffff
|
|
||||||
color_mid a0c040
|
|
||||||
|
|
||||||
color_value 00ffff
|
|
||||||
color_vbox 00ff00
|
|
||||||
color_vtrans 00ff00
|
|
||||||
|
|
||||||
color_x ff0000
|
|
||||||
color_xfill 800000
|
|
||||||
|
|
||||||
color_umark ff8080
|
|
||||||
color_mark ffff80
|
|
||||||
|
|
||||||
color_time ff8000
|
|
||||||
color_timeb 000040
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1,131 +0,0 @@
|
|||||||
#!/usr/bin/perl
|
|
||||||
|
|
||||||
use strict;
|
|
||||||
|
|
||||||
my $t_old ;
|
|
||||||
my $t ;
|
|
||||||
my $tt ;
|
|
||||||
my $inst ;
|
|
||||||
my $interf;
|
|
||||||
my $funct;
|
|
||||||
my $nfunc;
|
|
||||||
my $transid;
|
|
||||||
my $transaction_mode = 1;
|
|
||||||
|
|
||||||
my %wire = ( "CMM->RRM" => "w00" ,"RRM->CMM" => "w01",
|
|
||||||
"RRC->RRM" => "w02" ,"RRM->RRC" => "w03",
|
|
||||||
"PUSU->RRM" => "w06" ,"RRM->PUSU" => "w07"
|
|
||||||
);
|
|
||||||
|
|
||||||
my %old_value = ( "CMM->RRM" => "x" ,"RRM->CMM" => "x",
|
|
||||||
"PUSU->RRM" => "x" ,"RRM->PUSU" => "x",
|
|
||||||
"RRC->RRM" => "x" ,"RRM->RRC" => "x" );
|
|
||||||
|
|
||||||
my %value = ( "CMM->RRM" => "..." ,"RRM->CMM" => "...",
|
|
||||||
"PUSU->RRM" => "..." ,"RRM->PUSU" => "...",
|
|
||||||
"RRC->RRM" => "..." ,"RRM->RRC" => "..." );
|
|
||||||
|
|
||||||
open( FDOUT, ">wave.vcd" );
|
|
||||||
|
|
||||||
printf( FDOUT "\$comment
|
|
||||||
Affichage des echanges du RRM avec le RRC et le CMM
|
|
||||||
utiliser GTKwave pour visualiser ce fichier
|
|
||||||
-> http://linux-workshop.com/bybell/ver/wave/gtkwave9x.html
|
|
||||||
\$end
|
|
||||||
\$timescale
|
|
||||||
1us
|
|
||||||
\$end
|
|
||||||
|
|
||||||
\$version
|
|
||||||
timing simulation
|
|
||||||
\$end
|
|
||||||
|
|
||||||
\$var real 1 w00 CMM-->RRM \$end
|
|
||||||
\$var real 1 w01 RRM-->CCM \$end
|
|
||||||
\$var real 1 w02 RRC-->RRM \$end
|
|
||||||
\$var real 1 w03 RRM-->RRC \$end
|
|
||||||
\$var real 1 w04 transaction \$end
|
|
||||||
\$var real 1 w05 instance \$end
|
|
||||||
\$var real 1 w06 PUSU-->RRM \$end
|
|
||||||
\$var real 1 w07 RRM-->PUSU \$end
|
|
||||||
|
|
||||||
\$enddefinitions \$end
|
|
||||||
" );
|
|
||||||
|
|
||||||
|
|
||||||
#open( FDIN, "<toto.res" ) ;
|
|
||||||
open( FDIN, "cat cmm2rrm.txt rrc2rrm.txt pusu2rrm.txt rrm2cmm.txt rrm2rrc.txt rrm2pusu.txt | sort -n |" ) ;
|
|
||||||
while( <FDIN>)
|
|
||||||
{
|
|
||||||
chomp ;
|
|
||||||
( $t, $interf, $inst, $funct, $nfunc, $transid ) = split ;
|
|
||||||
|
|
||||||
$t_old = $t-0.1 if ($t_old ==0 ) ;
|
|
||||||
|
|
||||||
foreach my $k ( keys %old_value )
|
|
||||||
{
|
|
||||||
$value{$k} = "..." ;
|
|
||||||
}
|
|
||||||
|
|
||||||
$value{"$interf"}=$funct;
|
|
||||||
|
|
||||||
if ( $transaction_mode == 1)
|
|
||||||
{
|
|
||||||
printf( FDOUT "#%d\n", $tt *1e6 ) ;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
printf( FDOUT "#%d\n", ( ($t -$t_old) *1e6) ) ;
|
|
||||||
}
|
|
||||||
|
|
||||||
printf( FDOUT "r%d w04\n", $transid ) ;
|
|
||||||
printf( FDOUT "r%d w05\n", $inst ) ;
|
|
||||||
|
|
||||||
foreach my $k ( keys %old_value )
|
|
||||||
{
|
|
||||||
if ( $value{$k} ne $old_value{$k})
|
|
||||||
{
|
|
||||||
printf( FDOUT "s%s %s\n", $value{$k}, $wire{$k} ) ;
|
|
||||||
}
|
|
||||||
|
|
||||||
$old_value{$k} = $value{$k} ;
|
|
||||||
}
|
|
||||||
|
|
||||||
$tt+=0.1;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
foreach my $k ( keys %old_value )
|
|
||||||
{
|
|
||||||
$value{$k} = "..." ;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
if ( $transaction_mode == 1)
|
|
||||||
{
|
|
||||||
printf( FDOUT "#%d\ns... w04\n", ($tt+0.1 )*1e6 ) ;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
printf( FDOUT "#%d\ns... w04\n", int( ($t+0.1 -$t_old) *1e6 )) ;
|
|
||||||
}
|
|
||||||
|
|
||||||
foreach my $k ( keys %old_value )
|
|
||||||
{
|
|
||||||
if ( $value{$k} ne $old_value{$k})
|
|
||||||
{
|
|
||||||
printf( FDOUT "s%s %s\n", $value{$k}, $wire{$k} ) ;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( $transaction_mode == 1)
|
|
||||||
{
|
|
||||||
printf( FDOUT "#%d\ns... w04\n", ($tt+0.2 )*1e6 ) ;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
printf( FDOUT "#%d\ns... w04\n", int( ($t+0.2 -$t_old) *1e6 )) ;
|
|
||||||
}
|
|
||||||
|
|
||||||
close(FDIN);
|
|
||||||
close(FDOUT);
|
|
||||||
@@ -1,76 +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
|
|
||||||
|
|
||||||
*******************************************************************************/
|
|
||||||
|
|
||||||
/* Form definition file generated with fdesign. */
|
|
||||||
|
|
||||||
#include "forms.h"
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include "all_freq_to_users_form.h"
|
|
||||||
|
|
||||||
FD_all_freq_to_users *create_form_all_freq_to_users(void)
|
|
||||||
{
|
|
||||||
FL_OBJECT *obj;
|
|
||||||
FD_all_freq_to_users *fdui = (FD_all_freq_to_users *) fl_calloc(1, sizeof(*fdui));
|
|
||||||
|
|
||||||
//mod_lor_10_12_07++
|
|
||||||
/*fdui->all_freq_to_users = fl_bgn_form(FL_NO_BOX, 460, 300);
|
|
||||||
obj = fl_add_box(FL_UP_BOX,0,0,460,300,"");
|
|
||||||
fdui->User_2_channels = obj = fl_add_xyplot(FL_IMPULSE_XYPLOT,20,160,420,100,"User_2_channels");
|
|
||||||
fl_set_object_color(obj,FL_BLACK,FL_CHARTREUSE);
|
|
||||||
fl_set_object_lsize(obj,FL_NORMAL_SIZE);
|
|
||||||
fdui->User_1_channels = obj = fl_add_xyplot(FL_IMPULSE_XYPLOT,20,20,420,100,"User_1_channels");
|
|
||||||
fl_set_object_color(obj,FL_BLACK,FL_PALEGREEN);
|
|
||||||
fl_set_object_lsize(obj,FL_NORMAL_SIZE);
|
|
||||||
|
|
||||||
fl_end_form();*/
|
|
||||||
//mod_lor_10_12_07--: remove upper part and put part below when on 2 PCs
|
|
||||||
|
|
||||||
|
|
||||||
fdui->all_freq_to_users = fl_bgn_form(FL_NO_BOX, 460, 420);
|
|
||||||
obj = fl_add_box(FL_UP_BOX,0,0,460,420,"");
|
|
||||||
fdui->User_1_channels = obj = fl_add_xyplot(FL_IMPULSE_XYPLOT,20,20,420,100,"User_1_channels");
|
|
||||||
fl_set_object_color(obj,FL_BLACK,FL_PALEGREEN);
|
|
||||||
fl_set_object_lsize(obj,FL_NORMAL_SIZE);
|
|
||||||
fdui->User_2_channels = obj = fl_add_xyplot(FL_IMPULSE_XYPLOT,20,155,420,100,"User_2_channels");
|
|
||||||
fl_set_object_color(obj,FL_BLACK,FL_CHARTREUSE);
|
|
||||||
fl_set_object_lsize(obj,FL_NORMAL_SIZE);
|
|
||||||
fdui->User_3_channels = obj = fl_add_xyplot(FL_IMPULSE_XYPLOT,20,290,420,100,"User_3_channels");
|
|
||||||
fl_set_object_color(obj,FL_BLACK,FL_CYAN);
|
|
||||||
fl_set_object_lsize(obj,FL_NORMAL_SIZE);
|
|
||||||
/*fdui->User_4_channels = obj = fl_add_xyplot(FL_IMPULSE_XYPLOT,20,440,420,100,"User_4_channels");
|
|
||||||
fl_set_object_color(obj,FL_BLACK,FL_SLATEBLUE);
|
|
||||||
fl_set_object_lsize(obj,FL_NORMAL_SIZE);*/
|
|
||||||
fl_end_form();
|
|
||||||
|
|
||||||
fdui->all_freq_to_users->fdui = fdui;
|
|
||||||
|
|
||||||
return fdui;
|
|
||||||
}
|
|
||||||
/*---------------------------------------*/
|
|
||||||
|
|
||||||
@@ -1,106 +0,0 @@
|
|||||||
Magic: 13000
|
|
||||||
|
|
||||||
Internal Form Definition File
|
|
||||||
(do not change)
|
|
||||||
|
|
||||||
Number of forms: 1
|
|
||||||
Unit of measure: FL_COORD_PIXEL
|
|
||||||
|
|
||||||
=============== FORM ===============
|
|
||||||
Name: all_freq_to_users
|
|
||||||
Width: 580
|
|
||||||
Height: 590
|
|
||||||
Number of Objects: 5
|
|
||||||
|
|
||||||
--------------------
|
|
||||||
class: FL_BOX
|
|
||||||
type: UP_BOX
|
|
||||||
box: 0 0 580 590
|
|
||||||
boxtype: FL_UP_BOX
|
|
||||||
colors: FL_COL1 FL_COL1
|
|
||||||
alignment: FL_ALIGN_CENTER
|
|
||||||
style: FL_NORMAL_STYLE
|
|
||||||
size: FL_DEFAULT_SIZE
|
|
||||||
lcol: FL_BLACK
|
|
||||||
label:
|
|
||||||
shortcut:
|
|
||||||
resize: FL_RESIZE_ALL
|
|
||||||
gravity: FL_NoGravity FL_NoGravity
|
|
||||||
name:
|
|
||||||
callback:
|
|
||||||
argument:
|
|
||||||
|
|
||||||
--------------------
|
|
||||||
class: FL_XYPLOT
|
|
||||||
type: IMPULSE_XYPLOT
|
|
||||||
box: 40 20 490 100
|
|
||||||
boxtype: FL_FLAT_BOX
|
|
||||||
colors: FL_BLACK FL_PALEGREEN
|
|
||||||
alignment: FL_ALIGN_BOTTOM
|
|
||||||
style: FL_NORMAL_STYLE
|
|
||||||
size: FL_NORMAL_SIZE
|
|
||||||
lcol: FL_BLACK
|
|
||||||
label: User_1_channels
|
|
||||||
shortcut:
|
|
||||||
resize: FL_RESIZE_ALL
|
|
||||||
gravity: FL_NoGravity FL_NoGravity
|
|
||||||
name: User_1_channels
|
|
||||||
callback:
|
|
||||||
argument:
|
|
||||||
|
|
||||||
--------------------
|
|
||||||
class: FL_XYPLOT
|
|
||||||
type: IMPULSE_XYPLOT
|
|
||||||
box: 40 160 490 100
|
|
||||||
boxtype: FL_FLAT_BOX
|
|
||||||
colors: FL_BLACK FL_CHARTREUSE
|
|
||||||
alignment: FL_ALIGN_BOTTOM
|
|
||||||
style: FL_NORMAL_STYLE
|
|
||||||
size: FL_NORMAL_SIZE
|
|
||||||
lcol: FL_BLACK
|
|
||||||
label: User_2_channels
|
|
||||||
shortcut:
|
|
||||||
resize: FL_RESIZE_ALL
|
|
||||||
gravity: FL_NoGravity FL_NoGravity
|
|
||||||
name: User_2_channels
|
|
||||||
callback:
|
|
||||||
argument:
|
|
||||||
|
|
||||||
--------------------
|
|
||||||
class: FL_XYPLOT
|
|
||||||
type: IMPULSE_XYPLOT
|
|
||||||
box: 40 300 490 100
|
|
||||||
boxtype: FL_FLAT_BOX
|
|
||||||
colors: FL_BLACK FL_CYAN
|
|
||||||
alignment: FL_ALIGN_BOTTOM
|
|
||||||
style: FL_NORMAL_STYLE
|
|
||||||
size: FL_NORMAL_SIZE
|
|
||||||
lcol: FL_BLACK
|
|
||||||
label: User_3_channels
|
|
||||||
shortcut:
|
|
||||||
resize: FL_RESIZE_ALL
|
|
||||||
gravity: FL_NoGravity FL_NoGravity
|
|
||||||
name: User_3_channels
|
|
||||||
callback:
|
|
||||||
argument:
|
|
||||||
|
|
||||||
--------------------
|
|
||||||
class: FL_XYPLOT
|
|
||||||
type: IMPULSE_XYPLOT
|
|
||||||
box: 40 440 490 100
|
|
||||||
boxtype: FL_FLAT_BOX
|
|
||||||
colors: FL_BLACK FL_SLATEBLUE
|
|
||||||
alignment: FL_ALIGN_BOTTOM
|
|
||||||
style: FL_NORMAL_STYLE
|
|
||||||
size: FL_NORMAL_SIZE
|
|
||||||
lcol: FL_BLACK
|
|
||||||
label: User_4_channels
|
|
||||||
shortcut:
|
|
||||||
resize: FL_RESIZE_ALL
|
|
||||||
gravity: FL_NoGravity FL_NoGravity
|
|
||||||
name: User_4_channels
|
|
||||||
callback:
|
|
||||||
argument:
|
|
||||||
|
|
||||||
==============================
|
|
||||||
create_the_forms
|
|
||||||
@@ -1,52 +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
|
|
||||||
|
|
||||||
*******************************************************************************/
|
|
||||||
|
|
||||||
/** Header file generated with fdesign on Fri Nov 5 18:43:31 2010.**/
|
|
||||||
|
|
||||||
#ifndef FD_all_freq_to_users_h_
|
|
||||||
#define FD_all_freq_to_users_h_
|
|
||||||
|
|
||||||
/** Callbacks, globals and object handlers **/
|
|
||||||
|
|
||||||
|
|
||||||
/**** Forms and Objects ****/
|
|
||||||
typedef struct {
|
|
||||||
FL_FORM *all_freq_to_users;
|
|
||||||
void *vdata;
|
|
||||||
char *cdata;
|
|
||||||
long ldata;
|
|
||||||
FL_OBJECT *User_1_channels;
|
|
||||||
FL_OBJECT *User_2_channels;
|
|
||||||
FL_OBJECT *User_3_channels;
|
|
||||||
FL_OBJECT *User_4_channels;
|
|
||||||
} FD_all_freq_to_users;
|
|
||||||
|
|
||||||
extern FD_all_freq_to_users * create_form_all_freq_to_users(void);
|
|
||||||
|
|
||||||
#endif /* FD_all_freq_to_users_h_ */
|
|
||||||
@@ -1,197 +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 ch_init.c
|
|
||||||
|
|
||||||
\brief Fonctions permettant la gestion de la phase d'initialisation du
|
|
||||||
cluster head.
|
|
||||||
|
|
||||||
\author BURLOT Pascal
|
|
||||||
|
|
||||||
\date 29/08/08
|
|
||||||
|
|
||||||
|
|
||||||
\par Historique:
|
|
||||||
P.BURLOT 2009-01-20
|
|
||||||
+ separation de la file de message CMM/RRM a envoyer en 2 files
|
|
||||||
distinctes ( file_send_cmm_msg, file_send_rrc_msg)
|
|
||||||
L.IACOBELLI 2009-10-19
|
|
||||||
+ include
|
|
||||||
|
|
||||||
*******************************************************************************
|
|
||||||
*/
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <errno.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <unistd.h>
|
|
||||||
|
|
||||||
#include <sys/socket.h>
|
|
||||||
#include <sys/un.h>
|
|
||||||
|
|
||||||
#include <pthread.h>
|
|
||||||
|
|
||||||
#include "debug.h"
|
|
||||||
#include "L3_rrc_defs.h"
|
|
||||||
#include "L3_rrc_interface.h"
|
|
||||||
#include "cmm_rrm_interface.h"
|
|
||||||
#include "rrm_sock.h"
|
|
||||||
#include "rrc_rrm_msg.h"
|
|
||||||
#include "cmm_msg.h"
|
|
||||||
#include "msg_mngt.h"
|
|
||||||
#include "pusu_msg.h"
|
|
||||||
#include "rb_db.h"
|
|
||||||
#include "neighbor_db.h"
|
|
||||||
#include "sens_db.h"
|
|
||||||
#include "channels_db.h"
|
|
||||||
#include "rrm_util.h"
|
|
||||||
#include "transact.h"
|
|
||||||
#include "rrm_constant.h"
|
|
||||||
#include "rrm.h"
|
|
||||||
#include "ch_init.h"
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//! Met un message dans la file des messages a envoyer
|
|
||||||
#define PUT_CMM_MSG(m) put_msg( &(rrm->file_send_cmm_msg), 0, rrm->cmm.s,m ) //mod_lor_10_01_25
|
|
||||||
#define PUT_PUSU_MSG(m) put_msg( &(rrm->file_send_cmm_msg), 0, rrm->pusu.s,m) //mod_lor_10_01_25
|
|
||||||
#define PUT_RRC_MSG(m) put_msg( &(rrm->file_send_rrc_msg), 0, rrm->rrc.s,m ) //mod_lor_10_01_25
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief Request to initialize the Cluster Head with L3 Information
|
|
||||||
*/
|
|
||||||
void cmm_init_ch_req(
|
|
||||||
Instance_t inst , //!< Identification de l'instance
|
|
||||||
L3_INFO_T L3_info_t , //!< Type of L3 Information
|
|
||||||
void *L3_info //!< L3 addressing Information
|
|
||||||
)
|
|
||||||
{
|
|
||||||
rrm_t *rrm = &rrm_inst[inst] ;
|
|
||||||
|
|
||||||
if ( rrm->state == CLUSTERHEAD_INIT0 ) {
|
|
||||||
L2_ID src_dst[2] ;
|
|
||||||
memcpy(&src_dst[0], &rrm->L2_id, sizeof(L2_ID)) ;
|
|
||||||
memcpy(&src_dst[1], &rrm->L2_id, sizeof(L2_ID)) ;
|
|
||||||
|
|
||||||
if ( L3_info != NULL ) {
|
|
||||||
rrm->L3_info_t = L3_info_t ;
|
|
||||||
|
|
||||||
if ( L3_info_t != NONE_L3 )
|
|
||||||
memcpy( rrm->L3_info, L3_info, L3_info_t );
|
|
||||||
}
|
|
||||||
|
|
||||||
//fprintf(stderr,"L3_ch_init ");//dbg
|
|
||||||
//print_L3_id( IPv4_ADDR, rrm->L3_info );
|
|
||||||
//fprintf(stderr,"\n");//dbg
|
|
||||||
|
|
||||||
pthread_mutex_lock( &( rrm->rrc.exclu ) ) ;
|
|
||||||
rrm->rrc.trans_cnt++ ;
|
|
||||||
|
|
||||||
PUT_RRC_MSG(
|
|
||||||
msg_rrm_init_ch_req( inst,
|
|
||||||
rrm->rrc.trans_cnt,
|
|
||||||
&Lchan_desc[QOS_SRB0],
|
|
||||||
&Lchan_desc[QOS_SRB1],
|
|
||||||
rrm->L2_id
|
|
||||||
)
|
|
||||||
) ;
|
|
||||||
|
|
||||||
// On ne gere pas SRB0/1 car implicite
|
|
||||||
// add_rb( &(rrm->rrc.pRbEntry), rrm->rrc.trans_cnt, QOS_SRB0, &src_dst[0] ) ;
|
|
||||||
// add_rb( &(rrm->rrc.pRbEntry), rrm->rrc.trans_cnt, QOS_SRB1, &src_dst[0] ) ;
|
|
||||||
|
|
||||||
pthread_mutex_unlock( &( rrm->rrc.exclu ) ) ;
|
|
||||||
|
|
||||||
pthread_mutex_lock( &( rrm->pusu.exclu ) ) ;
|
|
||||||
rrm->pusu.trans_cnt++ ;
|
|
||||||
add_item_transact( &(rrm->pusu.transaction), rrm->pusu.trans_cnt,INT_PUSU,RRM_PUBLISH_IND,0,NO_PARENT);
|
|
||||||
pthread_mutex_unlock( &( rrm->pusu.exclu ) ) ;
|
|
||||||
PUT_PUSU_MSG(msg_rrm_publish_ind( inst, PUSU_RRM_SERVICE, rrm->pusu.trans_cnt )) ;
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief Mesh router PHY-Synch Indication
|
|
||||||
*/
|
|
||||||
void rrc_phy_synch_to_MR_ind(
|
|
||||||
Instance_t inst , //!< Identification de l'instance
|
|
||||||
L2_ID L2_id //!< L2 ID of MR
|
|
||||||
)
|
|
||||||
{
|
|
||||||
rrm_t *rrm = &rrm_inst[inst] ;
|
|
||||||
|
|
||||||
if ( rrm->state == ISOLATEDNODE ) {
|
|
||||||
/* Memorisation du L2_id du noeud ( c'est le niveau RRC qui a l'info ) */
|
|
||||||
memcpy( &rrm->L2_id, &L2_id, sizeof(L2_ID));
|
|
||||||
|
|
||||||
//--------------------------------------------
|
|
||||||
pthread_mutex_lock( &( rrm->rrc.exclu ) ) ;
|
|
||||||
|
|
||||||
if ( rrm->rrc.pNeighborEntry != NULL ) // Reset Neighborhood
|
|
||||||
del_all_neighbor( &(rrm->rrc.pNeighborEntry) );
|
|
||||||
|
|
||||||
pthread_mutex_unlock( &( rrm->rrc.exclu ) ) ;
|
|
||||||
|
|
||||||
//mod_lor_10_03_01++
|
|
||||||
//if (WSN){
|
|
||||||
if (WSN && rrm->id == FC_ID) {
|
|
||||||
rrm->role = FUSIONCENTER;
|
|
||||||
fprintf(stderr,"[CRRM] FUSIONCENTER\n");
|
|
||||||
} else if (rrm->id == BTS_ID && SCEN_1) {
|
|
||||||
rrm->role = BTS;
|
|
||||||
fprintf(stderr,"[CRRM] BTS\n");
|
|
||||||
}
|
|
||||||
//mod_lor_10_04_27++
|
|
||||||
else if (rrm->id == FC_ID && SCEN_2_CENTR) {
|
|
||||||
rrm->role = FUSIONCENTER;
|
|
||||||
fprintf(stderr,"[CRRM] CH1\n");
|
|
||||||
} else if (rrm->id == CH_COLL_ID &&SCEN_2_CENTR) {
|
|
||||||
rrm->role = CH_COLL;
|
|
||||||
fprintf(stderr,"[CRRM] CH2\n");
|
|
||||||
} else
|
|
||||||
fprintf(stderr,"Warning!!! No role assigned\n");
|
|
||||||
|
|
||||||
//mod_lor_10_04_27--
|
|
||||||
//mod_lor_10_03_01--
|
|
||||||
|
|
||||||
PUT_CMM_MSG( msg_router_is_CH_ind( inst,rrm->L2_id)) ;
|
|
||||||
|
|
||||||
rrm->state = CLUSTERHEAD_INIT0 ;
|
|
||||||
fprintf(stderr,"[CRRM] CLUSTERHEAD_INIT0\n");
|
|
||||||
} else
|
|
||||||
fprintf(stderr,"[CRRM] RRC_PHY_SYNCH_TO_MR_IND/TIMEOUT_IN is not allowed (Only IN):etat=%d\n",rrm->state);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@@ -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 ch_init.h
|
|
||||||
|
|
||||||
\brief Fichier d'entete contenant les declarations des types, des defines ,
|
|
||||||
et des fonctions relatives a la gestion de la phase d'initialisation
|
|
||||||
du cluster head.
|
|
||||||
|
|
||||||
\author BURLOT Pascal
|
|
||||||
|
|
||||||
\date 29/08/08
|
|
||||||
|
|
||||||
|
|
||||||
\par Historique:
|
|
||||||
$Author$ $Date$ $Revision$
|
|
||||||
$Id$
|
|
||||||
$Log$
|
|
||||||
|
|
||||||
*******************************************************************************
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef CH_INIT_H
|
|
||||||
#define CH_INIT_H
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif /* CH_INIT_H */
|
|
||||||
@@ -1,385 +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 channels_db.c
|
|
||||||
|
|
||||||
\brief Fonctions permettant la gestion de la base de donnée sur les canaux
|
|
||||||
|
|
||||||
\author IACOBELLI Lorenzo
|
|
||||||
|
|
||||||
\date 16/10/09
|
|
||||||
|
|
||||||
|
|
||||||
\par Historique:
|
|
||||||
$Author$ $Date$ $Revision$
|
|
||||||
$Id$
|
|
||||||
$Log$
|
|
||||||
|
|
||||||
*******************************************************************************
|
|
||||||
*/
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <errno.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <unistd.h>
|
|
||||||
|
|
||||||
#include <sys/socket.h>
|
|
||||||
#include <sys/un.h>
|
|
||||||
|
|
||||||
#include <pthread.h>
|
|
||||||
|
|
||||||
#include "debug.h"
|
|
||||||
#include "L3_rrc_defs.h"
|
|
||||||
#include "rrm_util.h"
|
|
||||||
#include "sens_db.h"
|
|
||||||
#include "channels_db.h"
|
|
||||||
|
|
||||||
|
|
||||||
//! Selection locale du mode de debug
|
|
||||||
#define DBG_CHANNELS_DB 1
|
|
||||||
|
|
||||||
#if DBG_CHANNELS_DB==0
|
|
||||||
//! Macro inactive
|
|
||||||
#define PRINT_CHANNELS_DB(...)
|
|
||||||
#else
|
|
||||||
//! Macro affichant la liste des radio bearers
|
|
||||||
#define PRINT_CHANNELS_DB(...) print_channels_db( __VA_ARGS__ )
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief La fonction affiche a l'ecran la liste (pour du debug)
|
|
||||||
|
|
||||||
\return aucune valeur retournee
|
|
||||||
*/
|
|
||||||
void print_channels_db(
|
|
||||||
CHANNELS_DB_T *pEntry ///< pointeur sur le debut de liste
|
|
||||||
)
|
|
||||||
{
|
|
||||||
//unsigned int i; //dbg
|
|
||||||
CHANNELS_DB_T *pCurrentItem = pEntry;
|
|
||||||
int i;
|
|
||||||
|
|
||||||
//fprintf(stderr,"channels entry @%p \n", pEntry);//dbg
|
|
||||||
//fprintf(stderr,"sens list=[\n");
|
|
||||||
while ( pCurrentItem != NULL) {
|
|
||||||
//fprintf(stderr,"curr channel %d is free? %d \n", pCurrentItem->channel.Ch_id,pCurrentItem->is_free);//dbg
|
|
||||||
|
|
||||||
pCurrentItem = pCurrentItem->next ;
|
|
||||||
}
|
|
||||||
|
|
||||||
fprintf(stderr," ]\n");
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief Comparaison de deux ID de niveau 2
|
|
||||||
|
|
||||||
\return si 0 alors les IDs sont identiques
|
|
||||||
*/
|
|
||||||
static int L2_ID_cmp(
|
|
||||||
L2_ID *L2_id1, ///< ID de niveau 2
|
|
||||||
L2_ID *L2_id2 ///< ID de niveau 2
|
|
||||||
)
|
|
||||||
{
|
|
||||||
return memcmp( L2_id1, L2_id2, sizeof(L2_ID) ) ;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief La fonction ajoute un nouveau canal.
|
|
||||||
|
|
||||||
\return retourne la valeur du nouvel element
|
|
||||||
*/
|
|
||||||
CHANNELS_DB_T *add_chann_db(
|
|
||||||
CHANNELS_DB_T **ch_entry , ///< pointeur sur l'entree de la liste de noeuds
|
|
||||||
CHANNEL_T channel , ///< channel to insert in the list
|
|
||||||
unsigned int is_free , ///< Information about the availability of the channel //mod_lor_10_05_28 ->char instead of int
|
|
||||||
double info_time ///< Date of information update
|
|
||||||
)
|
|
||||||
{
|
|
||||||
//fprintf(stderr,"starting ch pointer @%p \n", *ch_entry);//dbg
|
|
||||||
//fprintf(stderr,"\n NB_info=%d \n", NB_info); //dbg
|
|
||||||
CHANNELS_DB_T *pOldEntry = *ch_entry;
|
|
||||||
CHANNELS_DB_T *pNewItem = RRM_CALLOC( CHANNELS_DB_T , 1 ) ;
|
|
||||||
|
|
||||||
PNULL(pNewItem) ;
|
|
||||||
|
|
||||||
if ( pNewItem == NULL )
|
|
||||||
return NULL ;
|
|
||||||
|
|
||||||
memcpy( &(pNewItem->channel) ,&channel, sizeof(CHANNEL_T) ) ;
|
|
||||||
pNewItem->info_time = info_time ;
|
|
||||||
pNewItem->is_free = is_free;
|
|
||||||
pNewItem->priority = 0;
|
|
||||||
pNewItem->is_ass = 0;
|
|
||||||
//fprintf(stderr,"starting ch pointer @%p \n", pNewItem->info_hd);//dbg
|
|
||||||
|
|
||||||
|
|
||||||
*ch_entry = pNewItem ;
|
|
||||||
pNewItem->next = pOldEntry;
|
|
||||||
/*fprintf(stderr,"add_node\n\n");//dbg
|
|
||||||
fprintf(stderr,"node entry @%p \n", (*node_entry)->info_hd);//dbg
|
|
||||||
fprintf(stderr,"node entry @%p \n", pNewItem->info_hd);//dbg
|
|
||||||
fprintf(stderr,"passed par @%p \n", ch_info_hd);//dbg*/
|
|
||||||
|
|
||||||
return pNewItem ;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief La fonction detruit entierement les info sur les canaux memorizées à l'adresse indiqué
|
|
||||||
|
|
||||||
\return aucune valeur.
|
|
||||||
*/
|
|
||||||
void del_all_channels(
|
|
||||||
CHANNELS_DB_T **ch_entry ///< pointeur sur l'entree de la liste
|
|
||||||
)
|
|
||||||
{
|
|
||||||
CHANNELS_DB_T *pCurrentItem = *ch_entry;
|
|
||||||
CHANNELS_DB_T *pNextItem ;
|
|
||||||
|
|
||||||
if ( (pCurrentItem == NULL) || (ch_entry==NULL))
|
|
||||||
return ;
|
|
||||||
|
|
||||||
while ( pCurrentItem != NULL ) {
|
|
||||||
pNextItem = pCurrentItem->next ;
|
|
||||||
RRM_FREE( pCurrentItem ) ;
|
|
||||||
pCurrentItem = pNextItem ;
|
|
||||||
}
|
|
||||||
|
|
||||||
*ch_entry = NULL ;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief La fonction retire l'element identifie par le Ch_id de la liste des canaux
|
|
||||||
|
|
||||||
\return aucune valeur.
|
|
||||||
*/
|
|
||||||
void del_channel(
|
|
||||||
CHANNELS_DB_T **ch_entry , ///< pointeur sur l'entree de la liste de noeuds
|
|
||||||
unsigned int Ch_id ///< channel ID
|
|
||||||
)
|
|
||||||
{
|
|
||||||
CHANNELS_DB_T *pCurrentItem = *ch_entry;
|
|
||||||
CHANNELS_DB_T *pNextItem ;
|
|
||||||
CHANNELS_DB_T **ppPrevItem = ch_entry ;
|
|
||||||
|
|
||||||
if ( (pCurrentItem == NULL) || (ch_entry==NULL))
|
|
||||||
return ;
|
|
||||||
|
|
||||||
while ( pCurrentItem != NULL ) {
|
|
||||||
pNextItem = pCurrentItem->next ;
|
|
||||||
|
|
||||||
if ( pCurrentItem->channel.Ch_id == Ch_id ) {
|
|
||||||
*ppPrevItem = pNextItem;
|
|
||||||
|
|
||||||
RRM_FREE( pCurrentItem ) ;
|
|
||||||
fprintf( stdout,"channel %d deleted from database\n", Ch_id);
|
|
||||||
|
|
||||||
return ;
|
|
||||||
}
|
|
||||||
|
|
||||||
ppPrevItem = &(pCurrentItem->next) ;
|
|
||||||
pCurrentItem = pNextItem ;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( pCurrentItem == NULL )
|
|
||||||
fprintf(stderr, "ERROR: channel_id unknown\n") ;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief La fonction recherche le descripteur du canal identifie par le Ch_id
|
|
||||||
dans la liste des canaux
|
|
||||||
|
|
||||||
\return pointeur sur le descripteur de canal trouve sinon NULL .
|
|
||||||
*/
|
|
||||||
CHANNELS_DB_T *get_chann_db_info(
|
|
||||||
CHANNELS_DB_T *ch_entry , ///< pointeur sur l'entree de la liste de noeuds
|
|
||||||
unsigned int Ch_id ///< channel ID
|
|
||||||
)
|
|
||||||
{
|
|
||||||
CHANNELS_DB_T *pCurrentItem = ch_entry;
|
|
||||||
|
|
||||||
while ( pCurrentItem != NULL) {
|
|
||||||
if ( pCurrentItem->channel.Ch_id == Ch_id)
|
|
||||||
break ;
|
|
||||||
|
|
||||||
pCurrentItem = pCurrentItem->next ;
|
|
||||||
}
|
|
||||||
|
|
||||||
return pCurrentItem ;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief La fonction ajoute ou update un canal.
|
|
||||||
|
|
||||||
\return retourne la valeur du nouvel element
|
|
||||||
*/
|
|
||||||
CHANNELS_DB_T *up_chann_db(
|
|
||||||
CHANNELS_DB_T **ch_entry , ///< pointeur sur l'entree de la liste de noeuds
|
|
||||||
CHANNEL_T channel , ///< channel to insert in the list
|
|
||||||
unsigned int is_free , ///< Information about the availability of the channel //mod_lor_10_05_28 ->char instead of int
|
|
||||||
double info_time ///< Date of information update
|
|
||||||
)
|
|
||||||
{
|
|
||||||
if (ch_entry == NULL) {
|
|
||||||
fprintf(stderr,"ERROR! invalid database pointer \n");
|
|
||||||
return(NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
CHANNELS_DB_T *pNewItem = get_chann_db_info( *ch_entry, channel.Ch_id );
|
|
||||||
|
|
||||||
if ( pNewItem == NULL ) {
|
|
||||||
pNewItem = add_chann_db( ch_entry, channel, is_free, info_time);
|
|
||||||
return pNewItem;
|
|
||||||
}
|
|
||||||
|
|
||||||
pNewItem->info_time = info_time ;
|
|
||||||
//mod_lor_10_05_17++
|
|
||||||
pNewItem->is_free=is_free;
|
|
||||||
/*if (is_free == pNewItem->is_free)
|
|
||||||
return pNewItem;
|
|
||||||
if (!(pNewItem->is_ass)){
|
|
||||||
pNewItem->is_free=is_free;
|
|
||||||
return pNewItem;
|
|
||||||
}*/
|
|
||||||
return pNewItem;
|
|
||||||
//else
|
|
||||||
// fprintf(stderr,"Primary User detected on channel %d in use by secondary network\n", channel.Ch_id);//mod_lor_10_05_12
|
|
||||||
//mod_lor_10_05_17--
|
|
||||||
//PRINT_CHANNELS_DB(*ch_entry); //dbg
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief La fonction mis à jour les canaux assignés.
|
|
||||||
|
|
||||||
\return retourne la valeur du nouvel element
|
|
||||||
*/
|
|
||||||
CHANNELS_DB_T *up_chann_ass(
|
|
||||||
CHANNELS_DB_T *ch_entry , ///< pointeur sur l'entree de la liste de noeuds
|
|
||||||
unsigned int Ch_id , ///< ID of the channel to update
|
|
||||||
unsigned int is_ass , ///< Information about the use of the channel by the secondary network
|
|
||||||
L2_ID source_id , ///< In case of channel assigned: address of the source node that is using it
|
|
||||||
L2_ID dest_id ///< In case of channel assigned: address of the destination node that is using it
|
|
||||||
)
|
|
||||||
|
|
||||||
{
|
|
||||||
//fprintf(stderr,"up_channels 1 inizio\n");//dbg
|
|
||||||
CHANNELS_DB_T *pChannels = get_chann_db_info( ch_entry , Ch_id );
|
|
||||||
|
|
||||||
if (pChannels == NULL) {
|
|
||||||
fprintf(stderr,"ERROR! Channel %d not in database!\n", Ch_id);
|
|
||||||
return (NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
//fprintf(stderr,"up_channels 2 trovato\n");//dbg
|
|
||||||
//fprintf(stderr,"up_channels 2b is_free: %d is_ass: %d\n",pChannels->is_free,pChannels->is_ass);//dbg
|
|
||||||
if (!(pChannels->is_free)) {
|
|
||||||
fprintf(stderr,"The channel %d is not free!\n", Ch_id);
|
|
||||||
return (NULL); //mod_lor_10_05_17
|
|
||||||
} else if (pChannels->is_ass == is_ass) {
|
|
||||||
//fprintf(stderr,"up_channels 3 is_ass\n");//dbg
|
|
||||||
if (is_ass && L2_ID_cmp (&(source_id), &(pChannels->source_id))!=0)
|
|
||||||
fprintf(stderr,"The channel %d is already assigned \n", Ch_id);
|
|
||||||
|
|
||||||
//fprintf(stderr,"No updating performed for channel %d \n", Ch_id);//dbg
|
|
||||||
|
|
||||||
} else {
|
|
||||||
pChannels->is_ass = is_ass;
|
|
||||||
|
|
||||||
//fprintf(stderr,"up_channels 4 is_ass\n");//dbg
|
|
||||||
if (is_ass) {
|
|
||||||
//fprintf(stderr,"up_channels 5 is_ass\n");//dbg
|
|
||||||
memcpy( pChannels->source_id.L2_id, source_id.L2_id, sizeof(L2_ID) ) ;
|
|
||||||
memcpy( pChannels->dest_id.L2_id, dest_id.L2_id, sizeof(L2_ID) ) ;
|
|
||||||
}
|
|
||||||
|
|
||||||
//fprintf(stdout,"Channel %d assignement updated in %d\n", Ch_id, is_ass);//dbg
|
|
||||||
}
|
|
||||||
|
|
||||||
//fprintf(stderr,"up_channels 6 END\n");//dbg
|
|
||||||
return (pChannels);
|
|
||||||
}
|
|
||||||
|
|
||||||
//mod_lor_10_05_17++
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief The function select a new channel among the free ones. It selects the
|
|
||||||
first channel marked as free and not assigned in the channels database
|
|
||||||
and assigns it to the nodes whose L2_ids are passed as imput
|
|
||||||
|
|
||||||
\return the pointer to selected channel entry; NULL if not available channels are found
|
|
||||||
*/
|
|
||||||
CHANNELS_DB_T *select_new_channel(
|
|
||||||
CHANNELS_DB_T *ch_entry , ///< pointeur sur l'entree de la liste de noeuds
|
|
||||||
L2_ID source_id , ///< In case of channel assigned: address of the source node that is using it
|
|
||||||
L2_ID dest_id ///< In case of channel assigned: address of the destination node that is using it
|
|
||||||
)
|
|
||||||
|
|
||||||
{
|
|
||||||
|
|
||||||
CHANNELS_DB_T *pChannels = ch_entry;
|
|
||||||
|
|
||||||
while ( pChannels != NULL) {
|
|
||||||
if ( pChannels->is_free && !(pChannels->is_ass) )
|
|
||||||
break ;
|
|
||||||
|
|
||||||
pChannels = pChannels->next ;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
if (pChannels == NULL) {
|
|
||||||
fprintf(stderr,"*SELECT NEW CHANNEL* -> No free channels available!\n");
|
|
||||||
return (NULL);
|
|
||||||
} else {
|
|
||||||
pChannels->is_ass = 1;
|
|
||||||
memcpy( pChannels->source_id.L2_id, source_id.L2_id, sizeof(L2_ID) ) ;
|
|
||||||
memcpy( pChannels->dest_id.L2_id, dest_id.L2_id, sizeof(L2_ID) ) ;
|
|
||||||
}
|
|
||||||
|
|
||||||
return (pChannels);
|
|
||||||
}
|
|
||||||
//mod_lor_10_05_17--
|
|
||||||
@@ -1,73 +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 channels_db.h
|
|
||||||
|
|
||||||
\brief Fichier d'entete contenant les declarations des types, des defines ,
|
|
||||||
et des fonctions relatives a la gestion de la base de donnée sur
|
|
||||||
les canaux.
|
|
||||||
|
|
||||||
\author IACOBELLI Lorenzo
|
|
||||||
|
|
||||||
\date 16/10/09
|
|
||||||
|
|
||||||
|
|
||||||
\par Historique:
|
|
||||||
$Author$ $Date$ $Revision$
|
|
||||||
$Id$
|
|
||||||
$Log$
|
|
||||||
|
|
||||||
*******************************************************************************
|
|
||||||
*/
|
|
||||||
#ifndef CHANNELS_DB_H
|
|
||||||
#define CHANNELS_DB_H
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
|
||||||
|
|
||||||
CHANNELS_DB_T *add_chann_db( CHANNELS_DB_T **ch_entry, CHANNEL_T channel, unsigned int is_free, double info_time); //mod_lor_10_05_28 ->char instead of int
|
|
||||||
void del_channel( CHANNELS_DB_T **ch_entry, unsigned int Ch_id);
|
|
||||||
void del_all_channels( CHANNELS_DB_T **ch_entry ) ;
|
|
||||||
CHANNELS_DB_T *get_chann_db_info( CHANNELS_DB_T *ch_entry , unsigned int Ch_id );
|
|
||||||
CHANNELS_DB_T *up_chann_db( CHANNELS_DB_T **ch_entry, CHANNEL_T channel, unsigned int is_free, double info_time); //mod_lor_10_05_28 ->char instead of int
|
|
||||||
CHANNELS_DB_T *up_chann_ass( CHANNELS_DB_T *ch_entry, unsigned int Ch_id, unsigned int is_ass, L2_ID source_id, L2_ID dest_id);
|
|
||||||
CHANNELS_DB_T *select_new_channel( CHANNELS_DB_T *ch_entry, L2_ID source_id, L2_ID dest_id); //mod_lor_10_05_17
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif /* CHANNELS_DB_H */
|
|
||||||
@@ -1,793 +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 cmm_msg.c
|
|
||||||
|
|
||||||
\brief Fonctions permettant le formattage des donnees pour l'envoi d'un
|
|
||||||
message sur le socket entre le CMM et le RRM
|
|
||||||
|
|
||||||
\author BURLOT Pascal
|
|
||||||
|
|
||||||
\date 16/07/08
|
|
||||||
|
|
||||||
|
|
||||||
\par Historique:
|
|
||||||
L.IACOBELLI 2009-10-19
|
|
||||||
+ new messages
|
|
||||||
|
|
||||||
*******************************************************************************
|
|
||||||
*/
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <errno.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <unistd.h>
|
|
||||||
|
|
||||||
#include <sys/socket.h>
|
|
||||||
#include <sys/un.h>
|
|
||||||
|
|
||||||
#include <pthread.h>
|
|
||||||
|
|
||||||
#include "L3_rrc_defs.h"
|
|
||||||
#include "rrm_sock.h"
|
|
||||||
#include "cmm_rrm_interface.h"
|
|
||||||
#include "cmm_msg.h"
|
|
||||||
#include "rrm_util.h"
|
|
||||||
|
|
||||||
#ifdef TRACE
|
|
||||||
//! Macro creant la chaine a partir du nom de la variable
|
|
||||||
#define STRINGIZER(x) #x
|
|
||||||
//! Tableau pour le mode trace faisant la translation entre le numero et le nom du message
|
|
||||||
const char *Str_msg_cmm_rrm[NB_MSG_CMM_RRM] = {
|
|
||||||
STRINGIZER(CMM_CX_SETUP_REQ ),
|
|
||||||
STRINGIZER(RRM_CX_SETUP_CNF ),
|
|
||||||
STRINGIZER(CMM_CX_MODIFY_REQ ),
|
|
||||||
STRINGIZER(RRM_CX_MODIFY_CNF ),
|
|
||||||
STRINGIZER(CMM_CX_RELEASE_REQ ),
|
|
||||||
STRINGIZER(RRM_CX_RELEASE_CNF ),
|
|
||||||
STRINGIZER(CMM_CX_RELEASE_ALL_REQ ),
|
|
||||||
STRINGIZER(RRM_CX_RELEASE_ALL_CNF ),
|
|
||||||
STRINGIZER(RRCI_ATTACH_REQ ),
|
|
||||||
STRINGIZER(RRM_ATTACH_IND ),
|
|
||||||
STRINGIZER(CMM_ATTACH_CNF ),
|
|
||||||
STRINGIZER(RRM_MR_ATTACH_IND ),
|
|
||||||
STRINGIZER(ROUTER_IS_CH_IND ),
|
|
||||||
STRINGIZER(RRCI_CH_SYNCH_IND ),
|
|
||||||
STRINGIZER(CMM_INIT_MR_REQ ),
|
|
||||||
STRINGIZER(RRM_MR_SYNCH_IND ),
|
|
||||||
STRINGIZER(RRM_NO_SYNCH_IND ),
|
|
||||||
STRINGIZER(CMM_INIT_CH_REQ ),
|
|
||||||
STRINGIZER(CMM_INIT_SENSING ),
|
|
||||||
STRINGIZER(CMM_STOP_SENSING ),
|
|
||||||
STRINGIZER(CMM_ASK_FREQ ),
|
|
||||||
STRINGIZER(CMM_NEED_TO_TX ),
|
|
||||||
STRINGIZER(CMM_INIT_COLL_SENSING ),//add_lor_10_11_08
|
|
||||||
STRINGIZER(CMM_USER_DISC ),//add_lor_10_11_08
|
|
||||||
STRINGIZER(CMM_LINK_DISC )//,//add_lor_10_11_08
|
|
||||||
//STRINGIZER(CMM_INIT_TRANS_REQ ),
|
|
||||||
//STRINGIZER(RRM_INIT_TRANS_CONF )
|
|
||||||
};
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief This function initialize the message header
|
|
||||||
\return any return value
|
|
||||||
*/
|
|
||||||
static void init_cmm_msg_head(
|
|
||||||
msg_head_t *msg_head , //!< message header to initialize
|
|
||||||
Instance_t inst , //!< identification de l'instance
|
|
||||||
MSG_CMM_RRM_T msg_type , //!< type of message to initialize
|
|
||||||
unsigned int size , //!< size of message
|
|
||||||
Transaction_t Trans_id //!< transaction id associated to this message
|
|
||||||
)
|
|
||||||
{
|
|
||||||
if ( msg_head != NULL ) {
|
|
||||||
msg_head->start = START_MSG ;
|
|
||||||
msg_head->msg_type = 0xFF & msg_type ;
|
|
||||||
msg_head->inst = inst ;
|
|
||||||
msg_head->Trans_id = Trans_id ;
|
|
||||||
msg_head->size = size ;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief La fonction formate en un message les parametres de la fonction
|
|
||||||
cmm_cx_setup_req().
|
|
||||||
\return message formate
|
|
||||||
*/
|
|
||||||
msg_t * msg_cmm_cx_setup_req(
|
|
||||||
Instance_t inst , //!< identification de l'instance
|
|
||||||
L2_ID Src , //!< L2 source MAC address
|
|
||||||
L2_ID Dst , //!< L2 destination MAC address
|
|
||||||
QOS_CLASS_T QoS_class , //!< QOS class index
|
|
||||||
Transaction_t Trans_id //!< Transaction ID
|
|
||||||
)
|
|
||||||
{
|
|
||||||
msg_t *msg = RRM_CALLOC(msg_t , 1 ) ;
|
|
||||||
|
|
||||||
if ( msg != NULL ) {
|
|
||||||
cmm_cx_setup_req_t *p = RRM_CALLOC(cmm_cx_setup_req_t , 1 ) ;
|
|
||||||
|
|
||||||
if ( p != NULL ) {
|
|
||||||
init_cmm_msg_head(&(msg->head),inst,CMM_CX_SETUP_REQ, sizeof( cmm_cx_setup_req_t) ,Trans_id);
|
|
||||||
|
|
||||||
memcpy( p->Src.L2_id, Src.L2_id, sizeof(L2_ID) ) ;
|
|
||||||
memcpy( p->Dst.L2_id, Dst.L2_id, sizeof(L2_ID) ) ;
|
|
||||||
p->QoS_class = QoS_class;
|
|
||||||
}
|
|
||||||
|
|
||||||
msg->data = (char *) p ;
|
|
||||||
}
|
|
||||||
|
|
||||||
return msg ;
|
|
||||||
}
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief La fonction formate en un message les parametres de la fonction
|
|
||||||
rrm_cx_setup_cnf().
|
|
||||||
\return message formate
|
|
||||||
*/
|
|
||||||
msg_t * msg_rrm_cx_setup_cnf(
|
|
||||||
Instance_t inst , //!< identification de l'instance
|
|
||||||
RB_ID Rb_id , //!< L2 Rb_id
|
|
||||||
Transaction_t Trans_id //!< Transaction ID
|
|
||||||
)
|
|
||||||
{
|
|
||||||
msg_t *msg = RRM_CALLOC(msg_t , 1 ) ;
|
|
||||||
|
|
||||||
if ( msg != NULL ) {
|
|
||||||
rrm_cx_setup_cnf_t *p = RRM_CALLOC(rrm_cx_setup_cnf_t , 1 ) ;
|
|
||||||
|
|
||||||
if ( p != NULL ) {
|
|
||||||
init_cmm_msg_head(&(msg->head),inst,RRM_CX_SETUP_CNF, sizeof( rrm_cx_setup_cnf_t) ,Trans_id);
|
|
||||||
|
|
||||||
p->Rb_id = Rb_id ;
|
|
||||||
}
|
|
||||||
|
|
||||||
msg->data = (char *) p ;
|
|
||||||
}
|
|
||||||
|
|
||||||
return msg ;
|
|
||||||
}
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief La fonction formate en un message les parametres de la fonction
|
|
||||||
cmm_cx_modify_req().
|
|
||||||
\return message formate
|
|
||||||
*/
|
|
||||||
msg_t * msg_cmm_cx_modify_req(
|
|
||||||
Instance_t inst , //!< identification de l'instance
|
|
||||||
RB_ID Rb_id , //!< L2 Rb_id
|
|
||||||
QOS_CLASS_T QoS_class , //!< QOS class index
|
|
||||||
Transaction_t Trans_id //!< Transaction ID
|
|
||||||
)
|
|
||||||
{
|
|
||||||
msg_t *msg = RRM_CALLOC(msg_t , 1 ) ;
|
|
||||||
|
|
||||||
if ( msg != NULL ) {
|
|
||||||
cmm_cx_modify_req_t *p = RRM_CALLOC(cmm_cx_modify_req_t, 1 ) ;
|
|
||||||
|
|
||||||
if ( p != NULL ) {
|
|
||||||
init_cmm_msg_head(&(msg->head),inst,CMM_CX_MODIFY_REQ, sizeof( cmm_cx_modify_req_t ) ,Trans_id);
|
|
||||||
p->Rb_id = Rb_id ;
|
|
||||||
p->QoS_class = QoS_class ;
|
|
||||||
}
|
|
||||||
|
|
||||||
msg->data = (char *) p ;
|
|
||||||
}
|
|
||||||
|
|
||||||
return msg ;
|
|
||||||
}
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief La fonction formate en un message les parametres de la fonction
|
|
||||||
rrm_cx_modify_cnf().
|
|
||||||
\return message formate
|
|
||||||
*/
|
|
||||||
msg_t * msg_rrm_cx_modify_cnf(
|
|
||||||
Instance_t inst , //!< identification de l'instance
|
|
||||||
Transaction_t Trans_id //!< Transaction ID
|
|
||||||
)
|
|
||||||
{
|
|
||||||
msg_t *msg = RRM_CALLOC(msg_t , 1 ) ;
|
|
||||||
|
|
||||||
if ( msg != NULL ) {
|
|
||||||
init_cmm_msg_head(&(msg->head),inst,RRM_CX_MODIFY_CNF, 0 ,Trans_id);
|
|
||||||
msg->data = NULL ;
|
|
||||||
}
|
|
||||||
|
|
||||||
return msg ;
|
|
||||||
}
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief La fonction formate en un message les parametres de la fonction
|
|
||||||
cmm_cx_release_req().
|
|
||||||
\return message formate
|
|
||||||
*/
|
|
||||||
msg_t * msg_cmm_cx_release_req(
|
|
||||||
Instance_t inst , //!< identification de l'instance
|
|
||||||
RB_ID Rb_id , //!< L2 Rb_id
|
|
||||||
Transaction_t Trans_id //!< Transaction ID
|
|
||||||
)
|
|
||||||
{
|
|
||||||
msg_t *msg = RRM_CALLOC(msg_t , 1 ) ;
|
|
||||||
|
|
||||||
if ( msg != NULL ) {
|
|
||||||
cmm_cx_release_req_t *p = RRM_CALLOC(cmm_cx_release_req_t , 1) ;
|
|
||||||
|
|
||||||
if ( p != NULL ) {
|
|
||||||
init_cmm_msg_head(&(msg->head),inst,CMM_CX_RELEASE_REQ, sizeof( cmm_cx_release_req_t ) ,Trans_id);
|
|
||||||
p->Rb_id = Rb_id ;
|
|
||||||
}
|
|
||||||
|
|
||||||
msg->data = (char *) p ;
|
|
||||||
}
|
|
||||||
|
|
||||||
return msg ;
|
|
||||||
}
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief La fonction formate en un message les parametres de la fonction
|
|
||||||
rrm_cx_release_cnf().
|
|
||||||
\return message formate
|
|
||||||
*/
|
|
||||||
msg_t * msg_rrm_cx_release_cnf(
|
|
||||||
Instance_t inst , //!< identification de l'instance
|
|
||||||
Transaction_t Trans_id //!< Transaction ID
|
|
||||||
)
|
|
||||||
{
|
|
||||||
msg_t *msg = RRM_CALLOC(msg_t , 1 ) ;
|
|
||||||
|
|
||||||
if ( msg != NULL ) {
|
|
||||||
init_cmm_msg_head(&(msg->head),inst,RRM_CX_RELEASE_CNF, 0 ,Trans_id);
|
|
||||||
msg->data = NULL ;
|
|
||||||
}
|
|
||||||
|
|
||||||
return msg ;
|
|
||||||
}
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief La fonction formate en un message les parametres de la fonction
|
|
||||||
cmm_cx_release_all_req().
|
|
||||||
\return message formate
|
|
||||||
*/
|
|
||||||
msg_t * msg_cmm_cx_release_all_req(
|
|
||||||
Instance_t inst , //!< identification de l'instance
|
|
||||||
L2_ID L2_id , //!< L2 Rb_id
|
|
||||||
Transaction_t Trans_id //!< Transaction ID
|
|
||||||
)
|
|
||||||
{
|
|
||||||
msg_t *msg = RRM_CALLOC(msg_t , 1 ) ;
|
|
||||||
|
|
||||||
if ( msg != NULL ) {
|
|
||||||
cmm_cx_release_all_req_t *p = RRM_CALLOC(cmm_cx_release_all_req_t , 1 ) ;
|
|
||||||
|
|
||||||
if ( p != NULL ) {
|
|
||||||
init_cmm_msg_head(&(msg->head),inst,CMM_CX_RELEASE_ALL_REQ, sizeof( cmm_cx_release_all_req_t) ,Trans_id);
|
|
||||||
memcpy( p->L2_id.L2_id, L2_id.L2_id, sizeof(L2_ID) ) ;
|
|
||||||
}
|
|
||||||
|
|
||||||
msg->data = (char *) p ;
|
|
||||||
}
|
|
||||||
|
|
||||||
return msg ;
|
|
||||||
}
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief La fonction formate en un message les parametres de la fonction
|
|
||||||
rrm_cx_release_all_cnf().
|
|
||||||
\return message formate
|
|
||||||
*/
|
|
||||||
msg_t * msg_rrm_cx_release_all_cnf(
|
|
||||||
Instance_t inst , //!< identification de l'instance
|
|
||||||
Transaction_t Trans_id //!< Transaction ID
|
|
||||||
)
|
|
||||||
{
|
|
||||||
msg_t *msg = RRM_CALLOC(msg_t , 1 ) ;
|
|
||||||
|
|
||||||
if ( msg != NULL ) {
|
|
||||||
init_cmm_msg_head(&(msg->head),inst,RRM_CX_RELEASE_ALL_CNF, 0 ,Trans_id);
|
|
||||||
msg->data = NULL ;
|
|
||||||
}
|
|
||||||
|
|
||||||
return msg ;
|
|
||||||
}
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief La fonction formate en un message les parametres de la fonction
|
|
||||||
rrci_attach_req().
|
|
||||||
\return message formate
|
|
||||||
*/
|
|
||||||
msg_t * msg_rrci_attach_req(
|
|
||||||
Instance_t inst , //!< identification de l'instance
|
|
||||||
L2_ID L2_id , //!< Layer 2 (MAC) ID
|
|
||||||
L3_INFO_T L3_info_t , //!< Type of L3 Information
|
|
||||||
unsigned char *L3_info , //!< L3 addressing Information
|
|
||||||
RB_ID DTCH_B_id , //!< RBID of broadcast IP service (MR only)
|
|
||||||
RB_ID DTCH_id , //!< RBID of default IP service (MR only)
|
|
||||||
Transaction_t Trans_id //!< Transaction ID
|
|
||||||
)
|
|
||||||
{
|
|
||||||
msg_t *msg = RRM_CALLOC(msg_t , 1 ) ;
|
|
||||||
|
|
||||||
if ( msg != NULL ) {
|
|
||||||
rrci_attach_req_t *p = RRM_CALLOC(rrci_attach_req_t , 1 ) ;
|
|
||||||
|
|
||||||
if ( p != NULL ) {
|
|
||||||
init_cmm_msg_head(&(msg->head),inst,RRCI_ATTACH_REQ, sizeof( rrci_attach_req_t) ,Trans_id);
|
|
||||||
|
|
||||||
memcpy( p->L2_id.L2_id, L2_id.L2_id, sizeof(L2_ID) ) ;
|
|
||||||
p->L3_info_t = L3_info_t ;
|
|
||||||
|
|
||||||
if ( L3_info_t != NONE_L3 )
|
|
||||||
memcpy( p->L3_info, L3_info, L3_info_t );
|
|
||||||
|
|
||||||
p->DTCH_B_id = DTCH_B_id ;
|
|
||||||
p->DTCH_id = DTCH_id ;
|
|
||||||
}
|
|
||||||
|
|
||||||
msg->data = (char *) p ;
|
|
||||||
}
|
|
||||||
|
|
||||||
return msg ;
|
|
||||||
}
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief La fonction formate en un message les parametres de la fonction
|
|
||||||
rrm_attach_ind().
|
|
||||||
\return message formate
|
|
||||||
*/
|
|
||||||
msg_t * msg_rrm_attach_ind(
|
|
||||||
Instance_t inst , //!< identification de l'instance
|
|
||||||
L2_ID L2_id , //!< Layer 2 (MAC) ID
|
|
||||||
L3_INFO_T L3_info_t , //!< Type of L3 Information
|
|
||||||
unsigned char *L3_info , //!< L3 addressing Information
|
|
||||||
RB_ID DTCH_id //!< RBID of default IP service (MR only)
|
|
||||||
)
|
|
||||||
{
|
|
||||||
msg_t *msg = RRM_CALLOC(msg_t , 1 ) ;
|
|
||||||
|
|
||||||
if ( msg != NULL ) {
|
|
||||||
rrm_attach_ind_t *p = RRM_CALLOC(rrm_attach_ind_t , 1) ;
|
|
||||||
|
|
||||||
if ( p != NULL ) {
|
|
||||||
init_cmm_msg_head(&(msg->head),inst,RRM_ATTACH_IND, sizeof( rrm_attach_ind_t) ,0);
|
|
||||||
|
|
||||||
memcpy( p->L2_id.L2_id, L2_id.L2_id, sizeof(L2_ID) ) ;
|
|
||||||
p->L3_info_t = L3_info_t ;
|
|
||||||
|
|
||||||
if ( L3_info_t != NONE_L3 )
|
|
||||||
memcpy( p->L3_info, L3_info, L3_info_t );
|
|
||||||
|
|
||||||
p->DTCH_id = DTCH_id ;
|
|
||||||
}
|
|
||||||
|
|
||||||
msg->data = (char *) p ;
|
|
||||||
}
|
|
||||||
|
|
||||||
return msg ;
|
|
||||||
}
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief La fonction formate en un message les parametres de la fonction
|
|
||||||
cmm_attach_cnf().
|
|
||||||
\return message formate
|
|
||||||
*/
|
|
||||||
msg_t * msg_cmm_attach_cnf(
|
|
||||||
Instance_t inst , //!< identification de l'instance
|
|
||||||
L2_ID L2_id , //!< Layer 2 (MAC) ID
|
|
||||||
L3_INFO_T L3_info_t , //!< Type of L3 Information
|
|
||||||
unsigned char *L3_info , //!< L3 addressing Information
|
|
||||||
Transaction_t Trans_id //!< Transaction ID
|
|
||||||
)
|
|
||||||
{
|
|
||||||
msg_t *msg = RRM_CALLOC(msg_t , 1 ) ;
|
|
||||||
|
|
||||||
if ( msg != NULL ) {
|
|
||||||
cmm_attach_cnf_t *p = RRM_CALLOC(cmm_attach_cnf_t, 1 ) ;
|
|
||||||
|
|
||||||
if ( p != NULL ) {
|
|
||||||
init_cmm_msg_head(&(msg->head),inst,CMM_ATTACH_CNF, sizeof( cmm_attach_cnf_t) ,Trans_id);
|
|
||||||
|
|
||||||
p->L3_info_t = L3_info_t ;
|
|
||||||
|
|
||||||
if ( L3_info_t != NONE_L3 )
|
|
||||||
memcpy( p->L3_info, L3_info, L3_info_t );
|
|
||||||
|
|
||||||
memcpy( &p->L2_id, &L2_id, sizeof(L2_ID) );
|
|
||||||
}
|
|
||||||
|
|
||||||
msg->data = (char *) p ;
|
|
||||||
}
|
|
||||||
|
|
||||||
return msg ;
|
|
||||||
}
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief La fonction formate en un message les parametres de la fonction
|
|
||||||
rrm_MR_attach_ind().
|
|
||||||
\return message formate
|
|
||||||
*/
|
|
||||||
msg_t * msg_rrm_MR_attach_ind(
|
|
||||||
Instance_t inst , //!< identification de l'instance
|
|
||||||
L2_ID L2_id //!< MR Layer 2 (MAC) ID
|
|
||||||
)
|
|
||||||
{
|
|
||||||
msg_t *msg = RRM_CALLOC(msg_t , 1 ) ;
|
|
||||||
|
|
||||||
if ( msg != NULL ) {
|
|
||||||
rrm_MR_attach_ind_t *p = RRM_CALLOC( rrm_MR_attach_ind_t , 1 ) ;
|
|
||||||
|
|
||||||
if ( p != NULL ) {
|
|
||||||
init_cmm_msg_head(&(msg->head),inst,RRM_MR_ATTACH_IND, sizeof( rrm_MR_attach_ind_t) ,0);
|
|
||||||
memcpy( p->L2_id.L2_id, L2_id.L2_id, sizeof(L2_ID) ) ;
|
|
||||||
}
|
|
||||||
|
|
||||||
msg->data = (char *) p ;
|
|
||||||
}
|
|
||||||
|
|
||||||
return msg ;
|
|
||||||
}
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief La fonction formate en un message les parametres de la fonction
|
|
||||||
router_is_CH_ind().
|
|
||||||
\return message formate
|
|
||||||
*/
|
|
||||||
msg_t * msg_router_is_CH_ind(
|
|
||||||
Instance_t inst , //!< identification de l'instance
|
|
||||||
L2_ID L2_id //!< CH Layer 2 (MAC) ID
|
|
||||||
)
|
|
||||||
{
|
|
||||||
msg_t *msg = RRM_CALLOC(msg_t , 1 ) ;
|
|
||||||
|
|
||||||
if ( msg != NULL ) {
|
|
||||||
router_is_CH_ind_t *p = RRM_CALLOC(router_is_CH_ind_t , 1 ) ;
|
|
||||||
|
|
||||||
if ( p != NULL ) {
|
|
||||||
init_cmm_msg_head(&(msg->head),inst,ROUTER_IS_CH_IND, sizeof( router_is_CH_ind_t) ,0);
|
|
||||||
memcpy( p->L2_id.L2_id, L2_id.L2_id, sizeof(L2_ID) ) ;
|
|
||||||
}
|
|
||||||
|
|
||||||
msg->data = (char *) p ;
|
|
||||||
}
|
|
||||||
|
|
||||||
return msg ;
|
|
||||||
}
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief La fonction formate en un message les parametres de la fonction
|
|
||||||
rrci_CH_synch_ind().
|
|
||||||
\return message formate
|
|
||||||
*/
|
|
||||||
msg_t * msg_rrci_CH_synch_ind(
|
|
||||||
Instance_t inst //!< identification de l'instance
|
|
||||||
)
|
|
||||||
{
|
|
||||||
msg_t *msg = RRM_CALLOC(msg_t , 1 ) ;
|
|
||||||
|
|
||||||
if ( msg != NULL ) {
|
|
||||||
init_cmm_msg_head(&(msg->head),inst,RRCI_CH_SYNCH_IND, 0 ,0);
|
|
||||||
msg->data = NULL ;
|
|
||||||
}
|
|
||||||
|
|
||||||
return msg ;
|
|
||||||
}
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief La fonction formate en un message les parametres de la fonction
|
|
||||||
cmm_init_mr_req().
|
|
||||||
\return message formate
|
|
||||||
*/
|
|
||||||
msg_t * msg_cmm_init_mr_req(
|
|
||||||
Instance_t inst //!< identification de l'instance
|
|
||||||
)
|
|
||||||
{
|
|
||||||
msg_t *msg = RRM_CALLOC( msg_t , 1 ) ;
|
|
||||||
|
|
||||||
if ( msg != NULL ) {
|
|
||||||
init_cmm_msg_head(&(msg->head),inst,RRCI_CH_SYNCH_IND, 0 ,0);
|
|
||||||
|
|
||||||
msg->data = NULL ;
|
|
||||||
}
|
|
||||||
|
|
||||||
return msg ;
|
|
||||||
}
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief La fonction formate en un message les parametres de la fonction
|
|
||||||
rrm_MR_synch_ind().
|
|
||||||
\return message formate
|
|
||||||
*/
|
|
||||||
msg_t * msg_rrm_MR_synch_ind(
|
|
||||||
Instance_t inst //!< identification de l'instance
|
|
||||||
)
|
|
||||||
{
|
|
||||||
msg_t *msg = RRM_CALLOC(msg_t , 1 ) ;
|
|
||||||
|
|
||||||
if ( msg != NULL ) {
|
|
||||||
init_cmm_msg_head(&(msg->head),inst, RRM_MR_SYNCH_IND, 0 ,0);
|
|
||||||
msg->data = NULL ;
|
|
||||||
}
|
|
||||||
|
|
||||||
return msg ;
|
|
||||||
}
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief La fonction formate en un message les parametres de la fonction
|
|
||||||
rm_no_synch_ind().
|
|
||||||
\return message formate
|
|
||||||
*/
|
|
||||||
msg_t * msg_rrm_no_synch_ind(
|
|
||||||
Instance_t inst //!< identification de l'instance
|
|
||||||
)
|
|
||||||
{
|
|
||||||
msg_t *msg = RRM_CALLOC(msg_t ,1 ) ;
|
|
||||||
|
|
||||||
if ( msg != NULL ) {
|
|
||||||
init_cmm_msg_head(&(msg->head),inst,RRM_NO_SYNCH_IND, 0 ,0);
|
|
||||||
msg->data = NULL ;
|
|
||||||
}
|
|
||||||
|
|
||||||
return msg ;
|
|
||||||
}
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief La fonction formate en un message les parametres de la fonction
|
|
||||||
cmm_init_ch_req.
|
|
||||||
\return message formate
|
|
||||||
*/
|
|
||||||
msg_t * msg_cmm_init_ch_req(
|
|
||||||
Instance_t inst , //!< identification de l'instance
|
|
||||||
L3_INFO_T L3_info_t , //!< Type of L3 Information
|
|
||||||
void *L3_info //!< L3 addressing Information
|
|
||||||
)
|
|
||||||
{
|
|
||||||
msg_t *msg = RRM_CALLOC(msg_t , 1 ) ;
|
|
||||||
|
|
||||||
if ( msg != NULL ) {
|
|
||||||
cmm_init_ch_req_t *p = RRM_CALLOC(cmm_init_ch_req_t , 1 ) ;
|
|
||||||
|
|
||||||
if ( p != NULL ) {
|
|
||||||
init_cmm_msg_head(&(msg->head),inst, CMM_INIT_CH_REQ, sizeof( cmm_init_ch_req_t) ,0);
|
|
||||||
|
|
||||||
p->L3_info_t = L3_info_t ;
|
|
||||||
|
|
||||||
if ( L3_info_t != NONE_L3 )
|
|
||||||
memcpy( p->L3_info, L3_info, L3_info_t );
|
|
||||||
}
|
|
||||||
|
|
||||||
msg->data = (char *) p ;
|
|
||||||
}
|
|
||||||
|
|
||||||
return msg ;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief La fonction formate en un message les parametres de la fonction
|
|
||||||
cmm_init_sensing.
|
|
||||||
\return message formate
|
|
||||||
*/
|
|
||||||
msg_t *msg_cmm_init_sensing( //mod_lor_10_03_12: change of parameters
|
|
||||||
Instance_t inst, //!< identification de l'instance
|
|
||||||
unsigned int Start_fr,
|
|
||||||
unsigned int Stop_fr,
|
|
||||||
unsigned int Meas_band,
|
|
||||||
unsigned int Meas_tpf,
|
|
||||||
unsigned int Nb_channels,
|
|
||||||
unsigned int Overlap,
|
|
||||||
unsigned int Sampl_freq
|
|
||||||
)
|
|
||||||
{
|
|
||||||
msg_t *msg = RRM_CALLOC(msg_t , 1 ) ;
|
|
||||||
|
|
||||||
if ( msg != NULL ) {
|
|
||||||
cmm_init_sensing_t *p = RRM_CALLOC(cmm_init_sensing_t , 1 ) ;
|
|
||||||
|
|
||||||
if ( p != NULL ) {
|
|
||||||
init_cmm_msg_head(&(msg->head),inst, CMM_INIT_SENSING, sizeof( cmm_init_sensing_t) ,0);
|
|
||||||
//mod_lor_10_03_12++
|
|
||||||
p->Start_fr = Start_fr;
|
|
||||||
p->Stop_fr = Stop_fr;
|
|
||||||
p->Meas_band = Meas_band;
|
|
||||||
p->Meas_tpf = Meas_tpf;
|
|
||||||
p->Nb_channels = Nb_channels;
|
|
||||||
p->Overlap = Overlap;
|
|
||||||
p->Sampl_freq = Sampl_freq;
|
|
||||||
//mod_lor_10_03_12--
|
|
||||||
}
|
|
||||||
|
|
||||||
msg->data = (char *) p ;
|
|
||||||
}
|
|
||||||
|
|
||||||
return msg ;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief La fonction formate en un message les parametres de la fonction
|
|
||||||
cmm_stop_sensing.
|
|
||||||
\return message formate
|
|
||||||
*/
|
|
||||||
msg_t *msg_cmm_stop_sensing(
|
|
||||||
Instance_t inst //!< identification de l'instance
|
|
||||||
)
|
|
||||||
{
|
|
||||||
msg_t *msg = RRM_CALLOC(msg_t ,1 ) ;
|
|
||||||
|
|
||||||
if ( msg != NULL ) {
|
|
||||||
init_cmm_msg_head(&(msg->head),inst,CMM_STOP_SENSING, 0 ,0);
|
|
||||||
msg->data = NULL ;
|
|
||||||
}
|
|
||||||
|
|
||||||
return msg ;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief La fonction formate en un message les parametres de la fonction
|
|
||||||
cmm_ask_freq.
|
|
||||||
\return message formate
|
|
||||||
*/
|
|
||||||
msg_t *msg_cmm_ask_freq(
|
|
||||||
Instance_t inst //!< identification de l'instance
|
|
||||||
)
|
|
||||||
{
|
|
||||||
msg_t *msg = RRM_CALLOC(msg_t ,1 ) ;
|
|
||||||
|
|
||||||
if ( msg != NULL ) {
|
|
||||||
init_cmm_msg_head(&(msg->head),inst,CMM_ASK_FREQ, 0 ,0);
|
|
||||||
msg->data = NULL ;
|
|
||||||
}
|
|
||||||
|
|
||||||
return msg ;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief La fonction formate en un message les parametres de la fonction
|
|
||||||
cmm_need_to_tx. //add: mod_lor_10_10_28
|
|
||||||
\return message formate
|
|
||||||
*/
|
|
||||||
msg_t *msg_cmm_need_to_tx(
|
|
||||||
Instance_t inst ,//!< identification de l'instance du noeud qui veut transmettre
|
|
||||||
Instance_t dest ,//!< identification de l'instance du noeud destinataire
|
|
||||||
QOS_CLASS_T QoS_class //!< Required quality of service (i.e. number of channels)
|
|
||||||
)
|
|
||||||
{
|
|
||||||
msg_t *msg = RRM_CALLOC(msg_t ,1 ) ;
|
|
||||||
|
|
||||||
if ( msg != NULL ) {
|
|
||||||
cmm_need_to_tx_t *p = RRM_CALLOC(cmm_need_to_tx_t , 1 ) ;
|
|
||||||
|
|
||||||
if ( p != NULL ) {
|
|
||||||
init_cmm_msg_head(&(msg->head),inst, CMM_NEED_TO_TX, sizeof( cmm_need_to_tx_t) ,0);
|
|
||||||
p->dest = dest;
|
|
||||||
p->QoS_class = QoS_class;
|
|
||||||
}
|
|
||||||
|
|
||||||
msg->data = (char *) p ;
|
|
||||||
}
|
|
||||||
|
|
||||||
return msg ;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*! //add_lor_10_11_08
|
|
||||||
*******************************************************************************
|
|
||||||
\brief La fonction formate en un message les parametres de la fonction
|
|
||||||
cmm_init_coll_sensing.
|
|
||||||
\return message formate
|
|
||||||
*/
|
|
||||||
msg_t *msg_cmm_init_coll_sensing(
|
|
||||||
Instance_t inst, //!< identification de l'instance
|
|
||||||
unsigned int Start_fr,
|
|
||||||
unsigned int Stop_fr,
|
|
||||||
unsigned int Meas_band,
|
|
||||||
unsigned int Meas_tpf,
|
|
||||||
unsigned int Nb_channels,
|
|
||||||
unsigned int Overlap,
|
|
||||||
unsigned int Sampl_freq
|
|
||||||
)
|
|
||||||
{
|
|
||||||
msg_t *msg = RRM_CALLOC(msg_t , 1 ) ;
|
|
||||||
|
|
||||||
if ( msg != NULL ) {
|
|
||||||
cmm_init_coll_sensing_t *p = RRM_CALLOC(cmm_init_coll_sensing_t , 1 ) ;
|
|
||||||
|
|
||||||
if ( p != NULL ) {
|
|
||||||
init_cmm_msg_head(&(msg->head),inst, CMM_INIT_COLL_SENSING, sizeof( cmm_init_coll_sensing_t) ,0);
|
|
||||||
p->Start_fr = Start_fr;
|
|
||||||
p->Stop_fr = Stop_fr;
|
|
||||||
p->Meas_band = Meas_band;
|
|
||||||
p->Meas_tpf = Meas_tpf;
|
|
||||||
p->Nb_channels = Nb_channels;
|
|
||||||
p->Overlap = Overlap;
|
|
||||||
p->Sampl_freq = Sampl_freq;
|
|
||||||
}
|
|
||||||
|
|
||||||
msg->data = (char *) p ;
|
|
||||||
}
|
|
||||||
|
|
||||||
return msg ;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!//add_lor_10_11_09
|
|
||||||
*******************************************************************************
|
|
||||||
\brief La fonction formate en un message les parametres de la fonction
|
|
||||||
cmm_user_disc. msg received by a secondary user that wants to disconnect
|
|
||||||
\return message formate
|
|
||||||
*/
|
|
||||||
msg_t *msg_cmm_user_disc(
|
|
||||||
Instance_t inst //!< identification de l'instance
|
|
||||||
)
|
|
||||||
{
|
|
||||||
msg_t *msg = RRM_CALLOC(msg_t ,1 ) ;
|
|
||||||
|
|
||||||
if ( msg != NULL ) {
|
|
||||||
init_cmm_msg_head(&(msg->head),inst,CMM_USER_DISC, 0 ,0);
|
|
||||||
msg->data = NULL ;
|
|
||||||
}
|
|
||||||
|
|
||||||
return msg ;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!//add_lor_10_11_09
|
|
||||||
*******************************************************************************
|
|
||||||
\brief La fonction formate en un message les parametres de la fonction
|
|
||||||
cmm_linkr_disc. msg received by a secondary user that wants to stop a link
|
|
||||||
\return message formate
|
|
||||||
*/
|
|
||||||
msg_t *msg_cmm_link_disc(
|
|
||||||
Instance_t inst ,//!< identification de l'instance
|
|
||||||
Instance_t dest //!< identification du destinataire
|
|
||||||
)
|
|
||||||
{
|
|
||||||
msg_t *msg = RRM_CALLOC(msg_t ,1 ) ;
|
|
||||||
|
|
||||||
if ( msg != NULL ) {
|
|
||||||
cmm_link_disk_t *p = RRM_CALLOC(cmm_link_disk_t , 1 ) ;
|
|
||||||
|
|
||||||
if ( p != NULL ) {
|
|
||||||
init_cmm_msg_head(&(msg->head),inst, CMM_LINK_DISC, sizeof( cmm_link_disk_t) ,0);
|
|
||||||
p->dest = dest;
|
|
||||||
}
|
|
||||||
|
|
||||||
msg->data = (char *) p ;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
return msg ;
|
|
||||||
}
|
|
||||||
@@ -1,297 +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 cmm_msg.h
|
|
||||||
|
|
||||||
\brief Fichier d'entete contenant les declarations des types, des defines ,
|
|
||||||
et des fonctions relatives aux messages CMM-RRM ou CMM-RRCI.
|
|
||||||
|
|
||||||
Les fonctions servent à créer le buffer de message, remplir l'entete
|
|
||||||
et copier les parametres de fonction. Chaque fonction retourne le
|
|
||||||
message qui pourra être envoye sur le socket entre le CMM et le
|
|
||||||
RRM ou RRCI .
|
|
||||||
|
|
||||||
\author BURLOT Pascal
|
|
||||||
|
|
||||||
\date 16/07/08
|
|
||||||
|
|
||||||
|
|
||||||
\par Historique:
|
|
||||||
$Author$ $Date$ $Revision$
|
|
||||||
$Id$
|
|
||||||
$Log$
|
|
||||||
|
|
||||||
*******************************************************************************
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef CMM_MSG_H
|
|
||||||
#define CMM_MSG_H
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief Enumeration des messages entre le RRM/RRCI et le CMM
|
|
||||||
*/
|
|
||||||
typedef enum {
|
|
||||||
CMM_CX_SETUP_REQ = 0 , ///< Message CMM->RRM : requete de configuration d'une connexion
|
|
||||||
RRM_CX_SETUP_CNF , ///< Message RRM->CMM : confirmation de configuration d'une connexion
|
|
||||||
CMM_CX_MODIFY_REQ , ///< Message CMM->RRM : requete de modification d'une connexion
|
|
||||||
RRM_CX_MODIFY_CNF , ///< Message RRM->CMM : confirmation de modification d'une connexion
|
|
||||||
CMM_CX_RELEASE_REQ , ///< Message CMM->RRM : requete de liberation d'une connexion
|
|
||||||
RRM_CX_RELEASE_CNF , ///< Message RRM->CMM : confirmation de liberation d'une connexion
|
|
||||||
CMM_CX_RELEASE_ALL_REQ , ///< Message CMM->RRM : requete de liberation de toutes les connexions
|
|
||||||
RRM_CX_RELEASE_ALL_CNF , ///< Message RRM->CMM : confirmation de liberation de toutes les connexions
|
|
||||||
RRCI_ATTACH_REQ , ///< Message RRCI->CMM : requete de d'attachement d'un MR
|
|
||||||
RRM_ATTACH_IND , ///< Message RRM->CMM : indicateur d'attachement d'un MR
|
|
||||||
CMM_ATTACH_CNF , ///< Message CMM->RRM : confirmation d'attachement d'un MR
|
|
||||||
RRM_MR_ATTACH_IND , ///< Message RRM->CMM : indicateur d'attachement d'un MR
|
|
||||||
ROUTER_IS_CH_IND , ///< Message RRM->CMM : indicateur que le noeud est un cluster head
|
|
||||||
RRCI_CH_SYNCH_IND , ///< Message RRCI->CMM : indicateur que le noeud est synchronise sur un CH
|
|
||||||
CMM_INIT_MR_REQ , ///< Message CMM->RRM : requete d'initialisation de l'attachement d'un MR
|
|
||||||
RRM_MR_SYNCH_IND , ///< Message RRM->CMM : indicateur que le noeud est synchronise sur un MR
|
|
||||||
RRM_NO_SYNCH_IND , ///< Message RRM->CMM : indicateur que le noeud n'est pas synchronise sur un CH ou MR
|
|
||||||
CMM_INIT_CH_REQ , ///< Message CMM->RRM : requete d'initialisation d'un CH
|
|
||||||
CMM_INIT_SENSING , ///< Message CMM->RRM : requete d'initialisation du sensing
|
|
||||||
CMM_STOP_SENSING , ///< Message CMM->RRM : requete de stop du sensing
|
|
||||||
CMM_ASK_FREQ , ///< Message CMM->RRM : in BTS, message to start an open freq. query
|
|
||||||
CMM_NEED_TO_TX , ///< Message CMM->RRM : in SU, second scenario centr, message to start an open freq. query
|
|
||||||
CMM_INIT_COLL_SENSING , ///< Message CMM->RRM : requete d'initialisation du sensing collaborative //add_lor_10_11_08
|
|
||||||
CMM_USER_DISC , ///< Message CMM->RRM : user disconnected -> delete all active com //add_lor_10_11_08
|
|
||||||
CMM_LINK_DISC , ///< Message CMM->RRM : stop comm -> delete an active link //add_lor_10_11_08
|
|
||||||
//CMM_INIT_TRANS_REQ , ///< Message CMM->RRM : in SU, second scenario distr, message to start a connection with another SU
|
|
||||||
//RRM_INIT_TRANS_CONF , ///< Message RRM->CMM : confirmation de l'ouverture de la transition
|
|
||||||
NB_MSG_CMM_RRM ///< Nombre de message de l'interface
|
|
||||||
}
|
|
||||||
MSG_CMM_RRM_T ;
|
|
||||||
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief Definition des parametres de la fonction cmm_cx_setup_req() dans
|
|
||||||
une structure permettant le passage des parametres via un socket
|
|
||||||
*/
|
|
||||||
typedef struct {
|
|
||||||
L2_ID Src ; //!< L2 source MAC address
|
|
||||||
L2_ID Dst ; //!< L2 destination MAC address
|
|
||||||
QOS_CLASS_T QoS_class ; //!< QOS class index
|
|
||||||
} cmm_cx_setup_req_t ;
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief Definition des parametres des fonctions rrm_cx_setup_cnf() et cmm_cx_release_req()
|
|
||||||
dans une structure permettant le passage des parametres via un socket
|
|
||||||
*/
|
|
||||||
typedef struct {
|
|
||||||
RB_ID Rb_id ; //!< L2 Rb_id
|
|
||||||
} rrm_cx_setup_cnf_t ,
|
|
||||||
cmm_cx_release_req_t ;
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief Definition des parametres de la fonction cmm_cx_modify_req()
|
|
||||||
dans une structure permettant le passage des parametres via un socket
|
|
||||||
*/
|
|
||||||
typedef struct {
|
|
||||||
RB_ID Rb_id ; //!< L2 Rb_id
|
|
||||||
QOS_CLASS_T QoS_class ; //!< QOS class index
|
|
||||||
} cmm_cx_modify_req_t;
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief Definition des parametres de la fonction cmm_cx_release_all_req()
|
|
||||||
dans une structure permettant le passage des parametres via un socket
|
|
||||||
*/
|
|
||||||
typedef struct {
|
|
||||||
L2_ID L2_id ; //!< L2 Rb_id
|
|
||||||
} cmm_cx_release_all_req_t;
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief Definition des parametres de la fonction rrci_attach_req()
|
|
||||||
dans une structure permettant le passage des parametres via un socket
|
|
||||||
*/
|
|
||||||
typedef struct {
|
|
||||||
L2_ID L2_id ; //!< Layer 2 (MAC) ID
|
|
||||||
L3_INFO_T L3_info_t ; //!< Type of L3 Information
|
|
||||||
unsigned char L3_info[MAX_L3_INFO] ; //!< L3 addressing Information
|
|
||||||
RB_ID DTCH_B_id ; //!< RBID of broadcast IP service (MR only)
|
|
||||||
RB_ID DTCH_id ; //!< RBID of default IP service (MR only)
|
|
||||||
} rrci_attach_req_t ;
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief Definition des parametres de la fonction rrm_attach_ind()
|
|
||||||
dans une structure permettant le passage des parametres via un socket
|
|
||||||
*/
|
|
||||||
typedef struct {
|
|
||||||
L2_ID L2_id ; //!< Layer 2 (MAC) ID
|
|
||||||
L3_INFO_T L3_info_t ; //!< Type of L3 Information
|
|
||||||
unsigned char L3_info[MAX_L3_INFO] ; //!< L3 addressing Information
|
|
||||||
RB_ID DTCH_id ; //!< RBID of default IP service (MR only)
|
|
||||||
} rrm_attach_ind_t;
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief Definition des parametres des fonctions rrm_MR_attach_ind() et router_is_CH_ind()
|
|
||||||
dans une structure permettant le passage des parametres via un socket
|
|
||||||
*/
|
|
||||||
typedef struct {
|
|
||||||
L2_ID L2_id ; //!< MR Layer 2 (MAC) ID
|
|
||||||
} rrm_MR_attach_ind_t ,
|
|
||||||
router_is_CH_ind_t ;
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief Definition des parametres de la fonction cmm_init_ch_req()
|
|
||||||
dans une structure permettant le passage des parametres via un socket
|
|
||||||
*/
|
|
||||||
typedef struct {
|
|
||||||
L3_INFO_T L3_info_t ; //!< Type of L3 Information
|
|
||||||
unsigned char L3_info[MAX_L3_INFO] ; //!< L3 addressing Information
|
|
||||||
} cmm_init_ch_req_t ;
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief Definition des parametres de la fonction cmm_attach_cnf()
|
|
||||||
dans une structure permettant le passage des parametres via un socket
|
|
||||||
*/
|
|
||||||
typedef struct {
|
|
||||||
L2_ID L2_id;
|
|
||||||
L3_INFO_T L3_info_t ; //!< Type of L3 Information
|
|
||||||
unsigned char L3_info[MAX_L3_INFO] ; //!< L3 addressing Information
|
|
||||||
} cmm_attach_cnf_t ;
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief Definition des parametres de la fonction cmm_attach_cnf()
|
|
||||||
dans une structure permettant le passage des parametres via un socket
|
|
||||||
*/
|
|
||||||
//mod_lor_10_03_12++
|
|
||||||
typedef struct {
|
|
||||||
unsigned int Start_fr;
|
|
||||||
unsigned int Stop_fr;
|
|
||||||
unsigned int Meas_band;
|
|
||||||
unsigned int Meas_tpf;
|
|
||||||
unsigned int Nb_channels;
|
|
||||||
unsigned int Overlap;
|
|
||||||
unsigned int Sampl_freq;
|
|
||||||
} cmm_init_sensing_t, cmm_init_coll_sensing_t ;
|
|
||||||
//mod_lor_10_03_12++
|
|
||||||
|
|
||||||
/*!//add_lor_10_11_03
|
|
||||||
*******************************************************************************
|
|
||||||
\brief Definition des parametres de la fonction cmm_cx_setup_req() dans
|
|
||||||
une structure permettant le passage des parametres via un socket
|
|
||||||
*/
|
|
||||||
typedef struct {
|
|
||||||
Instance_t dest ; //!< Destination of the message
|
|
||||||
QOS_CLASS_T QoS_class ; //!< QOS class index
|
|
||||||
} cmm_need_to_tx_t ;
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief Definition des parametres de la fonction cmm_init_trans_req()
|
|
||||||
dans une structure permettant le passage des parametres via un socket
|
|
||||||
*/
|
|
||||||
typedef struct {
|
|
||||||
L2_ID L2_id ; //!< Layer 2 (MAC) ID of SU2
|
|
||||||
unsigned int Session_id ; //!< Session id
|
|
||||||
QOS_CLASS_T QoS_class ; //!< QOS class index
|
|
||||||
} cmm_init_trans_req_t ;
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief Definition des parametres de la fonction rrm_init_trans_conf()
|
|
||||||
dans une structure permettant le passage des parametres via un socket
|
|
||||||
*/
|
|
||||||
typedef struct {
|
|
||||||
unsigned int Session_id ; //!< Session id
|
|
||||||
CHANNEL_T all_channel ; //!< QOS class index
|
|
||||||
} rrm_init_trans_conf_t ;
|
|
||||||
|
|
||||||
/*!//add_lor_10_11_09
|
|
||||||
*******************************************************************************
|
|
||||||
\brief Definition des parametres de la fonction cmm_cx_setup_req() dans
|
|
||||||
une structure permettant le passage des parametres via un socket
|
|
||||||
*/
|
|
||||||
typedef struct {
|
|
||||||
Instance_t dest ; //!< Destination of the message
|
|
||||||
} cmm_link_disk_t ;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef TRACE
|
|
||||||
extern const char *Str_msg_cmm_rrm[NB_MSG_CMM_RRM] ;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Rappel : les paramètres sont identiques aux fonctions
|
|
||||||
* (sans le prefixe msg_ ) du fichier: cmm_rrm_interface.h
|
|
||||||
*/
|
|
||||||
msg_t *msg_cmm_cx_setup_req( Instance_t inst, L2_ID Src, L2_ID Dst, QOS_CLASS_T QoS_class, Transaction_t Trans_id );
|
|
||||||
msg_t *msg_rrm_cx_setup_cnf( Instance_t inst, RB_ID Rb_id, Transaction_t Trans_id );
|
|
||||||
msg_t *msg_cmm_cx_modify_req( Instance_t inst, RB_ID Rb_id , QOS_CLASS_T QoS_class, Transaction_t Trans_id );
|
|
||||||
msg_t *msg_rrm_cx_modify_cnf( Instance_t inst, Transaction_t Trans_id );
|
|
||||||
msg_t *msg_cmm_cx_release_req( Instance_t inst, RB_ID Rb_id , Transaction_t Trans_id );
|
|
||||||
msg_t *msg_rrm_cx_release_cnf( Instance_t inst, Transaction_t Trans_id );
|
|
||||||
msg_t *msg_cmm_cx_release_all_req( Instance_t inst, L2_ID L2_id , Transaction_t Trans_id );
|
|
||||||
msg_t *msg_rrm_cx_release_all_cnf( Instance_t inst, Transaction_t Trans_id );
|
|
||||||
msg_t *msg_rrci_attach_req( Instance_t inst, L2_ID L2_id, L3_INFO_T L3_info_t, unsigned char *L3_info,
|
|
||||||
RB_ID DTCH_B_id, RB_ID DTCH_id, Transaction_t Trans_id );
|
|
||||||
msg_t *msg_rrm_attach_ind( Instance_t inst, L2_ID L2_id, L3_INFO_T L3_info_t, unsigned char *L3_info, RB_ID DTCH_id );
|
|
||||||
msg_t *msg_cmm_attach_cnf( Instance_t inst, L2_ID L2_id, L3_INFO_T L3_info_t, unsigned char *L3_info,Transaction_t Trans_id );
|
|
||||||
msg_t *msg_rrm_MR_attach_ind( Instance_t inst, L2_ID L2_id );
|
|
||||||
msg_t *msg_router_is_CH_ind( Instance_t inst, L2_ID L2_id );
|
|
||||||
msg_t *msg_rrci_CH_synch_ind( Instance_t inst);
|
|
||||||
msg_t *msg_cmm_init_mr_req( Instance_t inst);
|
|
||||||
msg_t *msg_rrm_MR_synch_ind(Instance_t inst);
|
|
||||||
msg_t *msg_rrm_no_synch_ind( Instance_t inst);
|
|
||||||
msg_t *msg_cmm_init_ch_req( Instance_t inst, L3_INFO_T L3_info_t, void *L3_info );
|
|
||||||
msg_t *msg_cmm_init_sensing( Instance_t inst, unsigned int Start_fr, unsigned int Stop_fr,unsigned int Meas_band,
|
|
||||||
unsigned int Meas_tpf, unsigned int Nb_channels,unsigned int Overlap, unsigned int Sampl_freq ); //mod_lor_10_03_12
|
|
||||||
msg_t *msg_cmm_stop_sensing( Instance_t inst);
|
|
||||||
msg_t *msg_cmm_ask_freq( Instance_t inst);
|
|
||||||
msg_t *msg_cmm_need_to_tx( Instance_t inst, Instance_t dest,QOS_CLASS_T QoS_class);
|
|
||||||
msg_t *msg_cmm_init_trans_req( Instance_t inst, L2_ID L2_id , unsigned int Session_id, QOS_CLASS_T QoS_class, Transaction_t Trans_id );
|
|
||||||
msg_t *msg_rrm_init_trans_conf( Instance_t inst, unsigned int Session_id, CHANNEL_T all_channel, Transaction_t Trans_id );
|
|
||||||
msg_t *msg_cmm_ask_freq( Instance_t inst);
|
|
||||||
msg_t *msg_cmm_init_sensing( Instance_t inst, unsigned int Start_fr, unsigned int Stop_fr,unsigned int Meas_band,
|
|
||||||
unsigned int Meas_tpf, unsigned int Nb_channels,unsigned int Overlap, unsigned int Sampl_freq ); //add_lor_10_11_08
|
|
||||||
msg_t *msg_cmm_user_disc( Instance_t inst); //add_lor_10_11_08
|
|
||||||
msg_t *msg_cmm_link_disc( Instance_t inst, Instance_t dest); //add_lor_10_11_09
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif /* CMM_MSG_H */
|
|
||||||
@@ -1,136 +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 debug.h
|
|
||||||
|
|
||||||
\brief Fichier d'entete contenant les declarations des types, des defines ,
|
|
||||||
et des fonctions relatives au debug .
|
|
||||||
|
|
||||||
\author BURLOT Pascal
|
|
||||||
|
|
||||||
\date 29/08/08
|
|
||||||
|
|
||||||
|
|
||||||
\par Historique:
|
|
||||||
$Author$ $Date$ $Revision$
|
|
||||||
$Id$
|
|
||||||
$Log$
|
|
||||||
|
|
||||||
*******************************************************************************
|
|
||||||
*/
|
|
||||||
/*
|
|
||||||
*
|
|
||||||
* Si le flag DEBUG est defini, la macro ASSERT() ne fait rien et la
|
|
||||||
* macro CALL() se contente d'appeler la fonction sans tester le code d'erreur.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifdef DEBUG
|
|
||||||
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <errno.h>
|
|
||||||
|
|
||||||
///< Check si le retour de fonction est egale à -1 alors abort()
|
|
||||||
#define CALL(f) \
|
|
||||||
\
|
|
||||||
if (((int)(f)) == -1) \
|
|
||||||
{ \
|
|
||||||
int err = errno; \
|
|
||||||
char *strerr = strerror(err); \
|
|
||||||
\
|
|
||||||
fprintf(stderr, \
|
|
||||||
"CALL(%s): Error at line %u, file %s: %s (errno=%d)\n", \
|
|
||||||
#f, __LINE__, __FILE__, \
|
|
||||||
strerr == NULL ? "Bad error number" : strerr, \
|
|
||||||
err); \
|
|
||||||
abort(); \
|
|
||||||
}
|
|
||||||
|
|
||||||
///< Check si le pointeur est NULL alors abort()
|
|
||||||
#define PNULL(pp) \
|
|
||||||
\
|
|
||||||
if ( (pp) == NULL) \
|
|
||||||
{ \
|
|
||||||
fprintf(stderr, \
|
|
||||||
"PNULL(%s): Error at line %u, file %s: null pointer \n",\
|
|
||||||
#pp, __LINE__, __FILE__ ); \
|
|
||||||
abort(); \
|
|
||||||
}
|
|
||||||
|
|
||||||
#define FOPEN(pp,arg) \
|
|
||||||
pp=fopen arg ; \
|
|
||||||
if ( (pp) == NULL) \
|
|
||||||
{ \
|
|
||||||
int err = errno; \
|
|
||||||
char *strerr = strerror(err); \
|
|
||||||
\
|
|
||||||
fprintf(stderr, \
|
|
||||||
"%s=fopen%s: \n\tError at line %u, file %s: %s (errno=%d)\n",\
|
|
||||||
#pp, #arg, __LINE__, __FILE__ , \
|
|
||||||
strerr == NULL ? "Bad error number" : strerr, \
|
|
||||||
err); \
|
|
||||||
abort(); \
|
|
||||||
}
|
|
||||||
|
|
||||||
#define DBG_FPRINT(msg) fprintf msg
|
|
||||||
#define DBG_PRINT(msg) printf msg
|
|
||||||
|
|
||||||
#define ASSERT(cc) \
|
|
||||||
\
|
|
||||||
if (!(cc)) \
|
|
||||||
{ \
|
|
||||||
fprintf(stderr, \
|
|
||||||
"ASSERT(%s): at line %u, file %s\n", \
|
|
||||||
#cc, __LINE__, __FILE__); \
|
|
||||||
abort(); \
|
|
||||||
}
|
|
||||||
|
|
||||||
#define WARNING(cc) \
|
|
||||||
\
|
|
||||||
if ((cc)) \
|
|
||||||
{ \
|
|
||||||
fprintf(stderr, \
|
|
||||||
"WARNING(%s): at line %u, file %s\n", \
|
|
||||||
#cc, __LINE__, __FILE__); \
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
|
|
||||||
#define CALL(f) (f)
|
|
||||||
#define ASSERT(cc)
|
|
||||||
#define WARNING(cc)
|
|
||||||
#define PNULL(pp)
|
|
||||||
#define DBG_FPRINT(msg)
|
|
||||||
#define DBG_PRINT(msg)
|
|
||||||
#define FOPEN(pp,arg) pp=fopen arg
|
|
||||||
|
|
||||||
#endif
|
|
||||||
@@ -1,969 +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 freq_ass_op.c
|
|
||||||
|
|
||||||
\brief Fonctions permettant la gestion des frequences
|
|
||||||
|
|
||||||
\author IACOBELLI Lorenzo
|
|
||||||
|
|
||||||
\date 21/10/09
|
|
||||||
|
|
||||||
|
|
||||||
\par Historique:
|
|
||||||
$Author$ $Date$ $Revision$
|
|
||||||
$Id$
|
|
||||||
$Log$
|
|
||||||
|
|
||||||
|
|
||||||
*******************************************************************************
|
|
||||||
*/
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <errno.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <unistd.h>
|
|
||||||
|
|
||||||
#include <sys/socket.h>
|
|
||||||
#include <sys/un.h>
|
|
||||||
|
|
||||||
#include <pthread.h>
|
|
||||||
|
|
||||||
#include "debug.h"
|
|
||||||
#include "L3_rrc_defs.h"
|
|
||||||
#include "L3_rrc_interface.h"
|
|
||||||
#include "cmm_rrm_interface.h"
|
|
||||||
#include "rrm_sock.h"
|
|
||||||
#include "rrc_rrm_msg.h"
|
|
||||||
#include "sensing_rrm_msg.h"
|
|
||||||
#include "ip_msg.h" //mod_lor_10_04_27
|
|
||||||
#include "cmm_msg.h"
|
|
||||||
#include "msg_mngt.h"
|
|
||||||
#include "pusu_msg.h"
|
|
||||||
#include "rb_db.h"
|
|
||||||
#include "neighbor_db.h"
|
|
||||||
#include "sens_db.h"
|
|
||||||
#include "channels_db.h"
|
|
||||||
#include "rrm_util.h"
|
|
||||||
#include "transact.h"
|
|
||||||
#include "rrm_constant.h"
|
|
||||||
#include "rrm.h"
|
|
||||||
#include "freq_ass_op.h"
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//! Met un message dans la file des messages a envoyer
|
|
||||||
#define PUT_CMM_MSG(m) put_msg( &(rrm->file_send_cmm_msg), 0, rrm->cmm.s,m ) //mod_lor_10_01_25
|
|
||||||
#define PUT_PUSU_MSG(m) put_msg( &(rrm->file_send_cmm_msg), 0, rrm->pusu.s,m) //mod_lor_10_01_25
|
|
||||||
#define PUT_RRC_MSG(m) put_msg( &(rrm->file_send_rrc_msg), 0, rrm->rrc.s,m ) //mod_lor_10_01_25
|
|
||||||
#define PUT_IP_MSG(m) put_msg( &(rrm->file_send_ip_msg) , 1, rrm->ip.s,m ) //mod_lor_10_01_25
|
|
||||||
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief Comparaison de deux ID de niveau 2
|
|
||||||
|
|
||||||
\return si 0 alors les IDs sont identiques
|
|
||||||
*/
|
|
||||||
static int L2_ID_cmp(
|
|
||||||
L2_ID *L2_id1, ///< ID de niveau 2
|
|
||||||
L2_ID *L2_id2 ///< ID de niveau 2
|
|
||||||
)
|
|
||||||
{
|
|
||||||
return memcmp( L2_id1, L2_id2, sizeof(L2_ID) ) ;
|
|
||||||
}
|
|
||||||
//mod_lor_10_03_19++
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief Function that decides if a channel is free:
|
|
||||||
applyed rule: strict majority
|
|
||||||
\return 1 if channel is free, 0 otherwise
|
|
||||||
*/
|
|
||||||
//mod_eure_lor
|
|
||||||
void take_decision(
|
|
||||||
Sens_node_t *SensDB , //!< pointer to the sensing database
|
|
||||||
unsigned int Ch_id , //!< channel ID
|
|
||||||
unsigned int *is_free //mod_lor_10_05_28 ->char instead of int
|
|
||||||
|
|
||||||
)
|
|
||||||
{
|
|
||||||
Sens_node_t *pSensNode = SensDB;
|
|
||||||
Sens_ch_t *pSensChann;
|
|
||||||
//char is_free = 0;
|
|
||||||
int i;
|
|
||||||
|
|
||||||
while (pSensNode!= NULL) {
|
|
||||||
if((pSensChann = get_chann_info( pSensNode->info_hd , Ch_id)) != NULL) {
|
|
||||||
for (i = 0; i<NUM_SB; i++) {
|
|
||||||
if (pSensChann->is_free[i]==1)
|
|
||||||
is_free[i]++;
|
|
||||||
else if (pSensChann->is_free[i]==0)
|
|
||||||
is_free[i]--;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
pSensNode = pSensNode->next;
|
|
||||||
}
|
|
||||||
|
|
||||||
//mod_lor_10_05_07++
|
|
||||||
for (i = 0; i<NUM_SB; i++) {
|
|
||||||
if (is_free[i]>0)
|
|
||||||
is_free[i]=1;
|
|
||||||
else
|
|
||||||
is_free[i]=0;
|
|
||||||
}
|
|
||||||
|
|
||||||
//return pSensChann;
|
|
||||||
/*if (is_free>0)
|
|
||||||
return 1;
|
|
||||||
else
|
|
||||||
return 0;*/
|
|
||||||
//return is_free;
|
|
||||||
//mod_lor_10_05_07--
|
|
||||||
|
|
||||||
}
|
|
||||||
//mod_lor_10_03_19--
|
|
||||||
//mod_lor_10_05_26++
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief Function that decides if a channel is free:
|
|
||||||
applyed rule: strict majority
|
|
||||||
\return 0 if operation ended correctly, 1 if info on sensing channel does not exist
|
|
||||||
*/
|
|
||||||
|
|
||||||
unsigned int take_decision_sens(
|
|
||||||
Sens_node_t *SensDB , //!< pointer to the sensing database
|
|
||||||
Sens_ch_t *finalSensChann, //!< info that will be returned after decision
|
|
||||||
unsigned int Ch_id //!< channel ID
|
|
||||||
|
|
||||||
)
|
|
||||||
{
|
|
||||||
Sens_node_t *pSensNode = SensDB;
|
|
||||||
Sens_ch_t *pSensChann;
|
|
||||||
int i, flag=0;
|
|
||||||
|
|
||||||
for (i = 0; i<NUM_SB; i++) // initialization of is_free vector
|
|
||||||
finalSensChann->is_free[i]=10; //TO DO: to change when is_free becomes char instead of unsigned int
|
|
||||||
|
|
||||||
while (pSensNode!= NULL ) {
|
|
||||||
|
|
||||||
if((pSensChann = get_chann_info( pSensNode->info_hd , Ch_id)) != NULL) {
|
|
||||||
flag++;
|
|
||||||
|
|
||||||
for (i = 0; i<NUM_SB; i++) {
|
|
||||||
//printf (" ch %d is_free %d\t", i, pSensChann->is_free[i]);//dbg
|
|
||||||
if (pSensChann->is_free[i]==1)
|
|
||||||
finalSensChann->is_free[i]++;
|
|
||||||
else if (pSensChann->is_free[i]==0)
|
|
||||||
finalSensChann->is_free[i]--;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
pSensNode = pSensNode->next;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (flag==0) // case in which information on the channel requested is not in the database
|
|
||||||
return 1;
|
|
||||||
|
|
||||||
for (i = 0; i<NUM_SB; i++) {
|
|
||||||
if (finalSensChann->is_free[i]>10)
|
|
||||||
finalSensChann->is_free[i]=1;
|
|
||||||
else
|
|
||||||
finalSensChann->is_free[i]=0;
|
|
||||||
|
|
||||||
//printf ("ch %d is_free %d \n", i, finalSensChann->is_free[i]);
|
|
||||||
}
|
|
||||||
|
|
||||||
finalSensChann->Start_f = pSensChann->Start_f;
|
|
||||||
finalSensChann->Final_f = pSensChann->Final_f;
|
|
||||||
finalSensChann->Ch_id = pSensChann->Ch_id;
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
}
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief Function that identify free block of SB_NEEDED_FOR_SN subbands analysing the
|
|
||||||
* sensing information present in the sensing database; it saves the available channels
|
|
||||||
* in the channels database
|
|
||||||
|
|
||||||
\return
|
|
||||||
*/
|
|
||||||
unsigned int find_available_channels(
|
|
||||||
Sens_node_t *Sens_db,
|
|
||||||
CHANNELS_DB_T **channels_db
|
|
||||||
)
|
|
||||||
{
|
|
||||||
int sens_ch_id=1, sb, sb_f;
|
|
||||||
unsigned int curr_fr;
|
|
||||||
CHANNEL_T channel;
|
|
||||||
Sens_ch_t curr_sens_ch;
|
|
||||||
|
|
||||||
del_all_channels( channels_db ); //to remove all old entries
|
|
||||||
//printf("channels eliminated\n");//dbg
|
|
||||||
channel.Ch_id = 0;
|
|
||||||
channel.QoS = 0;
|
|
||||||
|
|
||||||
sb_f = 0;
|
|
||||||
|
|
||||||
// printf("beginning of find_available_channels\n\n\n");//dbg
|
|
||||||
while(take_decision_sens( Sens_db,&curr_sens_ch,sens_ch_id)==0) {
|
|
||||||
//printf("\nsens_ch_id in while :%d found channel id %d\n\n\n", sens_ch_id, curr_sens_ch.Ch_id);//dbg
|
|
||||||
curr_fr = curr_sens_ch.Start_f;
|
|
||||||
|
|
||||||
for (sb=0; sb<NUM_SB; sb++) { //loop over all the subbands of a sensing channel
|
|
||||||
//printf(" sb %d is_free %d", sb, curr_sens_ch.is_free[sb]);//dbg
|
|
||||||
if (curr_sens_ch.is_free[sb]==0) {
|
|
||||||
sb_f = 0;
|
|
||||||
curr_fr+=SB_BANDWIDTH;
|
|
||||||
} else {
|
|
||||||
sb_f++;
|
|
||||||
|
|
||||||
if (sb_f == BG+1) {
|
|
||||||
//printf("\nFirst free sb : %d start_freq_select %d\n",sb,curr_fr);//dbg
|
|
||||||
channel.Start_f = curr_fr;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (sb_f == SB_NEEDED_FOR_SN+BG)
|
|
||||||
channel.Final_f = curr_fr+SB_BANDWIDTH;
|
|
||||||
|
|
||||||
if (sb_f == (SB_NEEDED_FOR_SN+(2*BG))) {
|
|
||||||
//curr_fr += SB_BANDWIDTH;
|
|
||||||
//printf("last free sb : %d end_freq_select %d\n",sb,channel.Final_f);//dbg
|
|
||||||
channel.Ch_id++;
|
|
||||||
add_chann_db(channels_db,channel,1,0);
|
|
||||||
sb_f = BG; //to avoid to compute two times the BG
|
|
||||||
//printf("added channel %d start %d end %d\n", channel.Ch_id, channel.Start_f, channel.Final_f);//dbg
|
|
||||||
}
|
|
||||||
|
|
||||||
curr_fr+=SB_BANDWIDTH;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
sens_ch_id++;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
return (channel.Ch_id); //the last Ch_id memorized in channels database corresponds to the total number of free channels found
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
//mod_lor_10_05_26--
|
|
||||||
//mod_lor_10_05_28++
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief Function to check if the channels used by SN are still free
|
|
||||||
|
|
||||||
\return
|
|
||||||
*/
|
|
||||||
unsigned int evalaute_sens_info(
|
|
||||||
Sens_node_t *Sens_db,
|
|
||||||
unsigned int Start_f,
|
|
||||||
unsigned int Final_f
|
|
||||||
)
|
|
||||||
{
|
|
||||||
unsigned int i=0, sb, curr_freq;
|
|
||||||
int is_free[MIN_NB_SB_CH];
|
|
||||||
Sens_node_t *ac_node = Sens_db;
|
|
||||||
Sens_ch_t *ac_chann;
|
|
||||||
|
|
||||||
for (i=0; i<MIN_NB_SB_CH; i++)
|
|
||||||
is_free[i]=0;
|
|
||||||
|
|
||||||
while (ac_node != NULL) {
|
|
||||||
ac_chann = ac_node->info_hd;
|
|
||||||
|
|
||||||
while (ac_chann!= NULL ) {
|
|
||||||
// printf("actual ch_id %d actual start_f %d final_f %d\n",ac_chann->Ch_id, ac_chann->Start_f,ac_chann->Final_f);//dbg
|
|
||||||
if (ac_chann->Start_f < Final_f && ac_chann->Final_f > Start_f) {
|
|
||||||
sb = 0;
|
|
||||||
curr_freq = ac_chann->Start_f;
|
|
||||||
|
|
||||||
while (sb < NUM_SB && curr_freq<Start_f) {
|
|
||||||
sb++;
|
|
||||||
curr_freq+=SB_BANDWIDTH;
|
|
||||||
}
|
|
||||||
|
|
||||||
//printf ("sb after first loop %d curr_fr %d\n", sb, curr_freq);//dbg
|
|
||||||
while (sb < NUM_SB && curr_freq<Final_f) {
|
|
||||||
// printf ("curr_fr %d\n", curr_freq);//dbg
|
|
||||||
i = (curr_freq - Start_f)/SB_BANDWIDTH;
|
|
||||||
|
|
||||||
// printf("index for is_free vector %d, freq %d, sb %d\n",i, curr_freq, sb);//dbg
|
|
||||||
if (i >= MIN_NB_SB_CH) {
|
|
||||||
printf("ERROR!\n");
|
|
||||||
return 2;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ac_chann->is_free[sb]==1)
|
|
||||||
is_free[i]++;
|
|
||||||
|
|
||||||
if (ac_chann->is_free[sb]==0)
|
|
||||||
is_free[i]--;
|
|
||||||
|
|
||||||
sb++;
|
|
||||||
curr_freq+=SB_BANDWIDTH;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
ac_chann=ac_chann->next;
|
|
||||||
}
|
|
||||||
|
|
||||||
ac_node = ac_node->next;
|
|
||||||
}
|
|
||||||
|
|
||||||
for (i=0; i<MIN_NB_SB_CH; i++)
|
|
||||||
if (is_free[i]<=0)
|
|
||||||
return 1;
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
}
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief Function to check if the channels used by SN are still free
|
|
||||||
|
|
||||||
\return
|
|
||||||
*/
|
|
||||||
unsigned int check_SN_channels(
|
|
||||||
Sens_node_t *Sens_db,
|
|
||||||
CHANNELS_DB_T *channels_db,
|
|
||||||
unsigned int *used_channels,
|
|
||||||
unsigned int nb_used_ch
|
|
||||||
|
|
||||||
)
|
|
||||||
{
|
|
||||||
int i, need_to_update=0;
|
|
||||||
CHANNELS_DB_T *channel_2_check;
|
|
||||||
|
|
||||||
for (i=0; i<nb_used_ch; i++) {
|
|
||||||
channel_2_check = get_chann_db_info( channels_db , used_channels[i] );
|
|
||||||
|
|
||||||
//printf("check channel: %d, start_fr: %d, final_f: %d\n",used_channels[i], channel_2_check->channel.Start_f, channel_2_check->channel.Final_f);//dbg
|
|
||||||
if( evalaute_sens_info(Sens_db, channel_2_check->channel.Start_f, channel_2_check->channel.Final_f))
|
|
||||||
need_to_update = 1;
|
|
||||||
|
|
||||||
//printf("need_to_update: %d\n",need_to_update);//dbg
|
|
||||||
}
|
|
||||||
|
|
||||||
return need_to_update;
|
|
||||||
|
|
||||||
}
|
|
||||||
//mod_lor_10_05_28--
|
|
||||||
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief CMM frequency query request. This message has also the scope to
|
|
||||||
* initialize the RRM in BTS state.
|
|
||||||
*/
|
|
||||||
void cmm_ask_freq(
|
|
||||||
Instance_t inst //!< identification de l'instance
|
|
||||||
)
|
|
||||||
{
|
|
||||||
rrm_t *rrm = &rrm_inst[inst] ;
|
|
||||||
|
|
||||||
pthread_mutex_lock( &( rrm->ip.exclu ) ) ;
|
|
||||||
rrm->ip.trans_cnt++ ;
|
|
||||||
PUT_IP_MSG(msg_open_freq_query_4( inst, rrm->L2_id_FC, 0, rrm->ip.trans_cnt));
|
|
||||||
pthread_mutex_unlock( &( rrm->ip.exclu ) ) ;
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!//mod_lor_10_10_28
|
|
||||||
*******************************************************************************
|
|
||||||
\brief CMM of secondary user ask activate a transmission requirement.
|
|
||||||
* In the message it pass its L2_id to be identified by its Cluster Head
|
|
||||||
*/
|
|
||||||
void cmm_need_to_tx(
|
|
||||||
Instance_t inst ,//!< identification de l'instance
|
|
||||||
Instance_t dest ,//!< identification de l'instance du noeud destinataire
|
|
||||||
QOS_CLASS_T QoS_class //!< Required quality of service (i.e. number of channels)
|
|
||||||
)
|
|
||||||
{
|
|
||||||
rrm_t *rrm = &rrm_inst[inst] ;
|
|
||||||
rrm_t *rrm_dest = &rrm_inst[dest];
|
|
||||||
pthread_mutex_lock( &( rrm->ip.exclu ) ) ;
|
|
||||||
rrm->ip.trans_cnt++ ;
|
|
||||||
PUT_IP_MSG(msg_ask_freq_to_CH_3( inst, rrm->L2_id, rrm_dest->L2_id, QoS_class, rrm->ip.trans_cnt));
|
|
||||||
pthread_mutex_unlock( &( rrm->ip.exclu ) ) ;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief BTS ask for frequency
|
|
||||||
*/
|
|
||||||
unsigned int open_freq_query( //mod_lor_10_06_02
|
|
||||||
Instance_t inst , //!< identification de l'instance
|
|
||||||
L2_ID L2_id , //!< L2_id of the BTS/SU
|
|
||||||
QOS_CLASS_T QoS , //!< quality of service required (0 means all available QoS)
|
|
||||||
Transaction_t Trans_id //!< Transaction ID
|
|
||||||
)
|
|
||||||
{
|
|
||||||
rrm_t *rrm = &rrm_inst[inst] ;
|
|
||||||
unsigned int NB_chan=0, ind = 0;
|
|
||||||
CHANNELS_DB_T *pChannels;
|
|
||||||
CHANNELS_DB_T channels_hd[NB_SENS_MAX];
|
|
||||||
//mod_lor_10_05_26++
|
|
||||||
/*pthread_mutex_lock( &( rrm->rrc.exclu ) ) ; //mod_lor_10_03_08
|
|
||||||
CHANNELS_DB_T *pChannelsEntry=rrm->rrc.pChannelsEntry;
|
|
||||||
CHANNELS_DB_T *pChannels = pChannelsEntry;
|
|
||||||
|
|
||||||
//fprintf(stdout,"cp3 : NB_free_chan %d\n", NB_free_ch); //dbg
|
|
||||||
//mod_lor_10_05_17++: send vector with all frequencies (not only free ones)
|
|
||||||
CHANNELS_DB_T channels_hd[NB_SENS_MAX];
|
|
||||||
pChannels = pChannelsEntry;
|
|
||||||
while (pChannels!=NULL){//mod_lor_10_03_08
|
|
||||||
memcpy(&(channels_hd[NB_chan]) , pChannels, sizeof(CHANNELS_DB_T));
|
|
||||||
pChannels = pChannels->next;
|
|
||||||
NB_chan++;
|
|
||||||
}
|
|
||||||
//mod_lor_10_05_17--
|
|
||||||
pthread_mutex_unlock( &( rrm->rrc.exclu ) ) ; //mod_lor_10_03_08
|
|
||||||
|
|
||||||
//fprintf(stdout,"NB_free_chan %d\n", NB_free_ch); //dbg
|
|
||||||
//for (int i = 0; i<NB_free_ch; i++)//dbg
|
|
||||||
// fprintf(stdout,"channel %d meas %f\n", free_channels_hd[i].Ch_id, free_channels_hd[i].meas); //dbg
|
|
||||||
|
|
||||||
//printf("channels in open_freq_query_funct\n");//dbg
|
|
||||||
//for (int i=0; i<NB_chan;i++)//dbg
|
|
||||||
// printf(" %d ",channels_hd[i].channel.Ch_id);//dbg
|
|
||||||
//printf("\n");//dbg */
|
|
||||||
pthread_mutex_lock( &( rrm->rrc.exclu ) ) ;
|
|
||||||
NB_chan = find_available_channels(rrm->rrc.pSensEntry,&(rrm->rrc.pChannelsEntry));
|
|
||||||
pthread_mutex_unlock( &( rrm->rrc.exclu ) ) ;
|
|
||||||
|
|
||||||
pChannels = rrm->rrc.pChannelsEntry;
|
|
||||||
|
|
||||||
while (pChannels!=NULL) { //mod_lor_10_03_08
|
|
||||||
memcpy(&(channels_hd[ind]) , pChannels, sizeof(CHANNELS_DB_T));
|
|
||||||
//printf ("copied channel: %d start %d end %d\n",channels_hd[ind].channel.Ch_id,channels_hd[ind].channel.Start_f,channels_hd[ind].channel.Final_f);//dbg
|
|
||||||
pChannels = pChannels->next;
|
|
||||||
ind++;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ind!=NB_chan)
|
|
||||||
printf("Error!!! Found free channels: %d, copyed channels: %d\n",NB_chan, ind);
|
|
||||||
|
|
||||||
//mod_lor_10_05_26--
|
|
||||||
if (Trans_id!=1 || NB_chan!=0) { //mod_lor_10_06_02
|
|
||||||
|
|
||||||
pthread_mutex_lock( &( rrm->ip.exclu ) ) ;
|
|
||||||
rrm->ip.trans_cnt++ ;
|
|
||||||
PUT_IP_MSG(msg_update_open_freq_7( inst, L2_id, NB_chan, channels_hd, rrm->ip.trans_cnt));
|
|
||||||
rrm->ip.waiting_SN_update=1;
|
|
||||||
pthread_mutex_unlock( &( rrm->ip.exclu ) ) ;
|
|
||||||
}
|
|
||||||
|
|
||||||
return (NB_chan);//mod_lor_10_06_02
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief RRC open frequency.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
unsigned int update_open_freq( //mod_lor_10_05_18
|
|
||||||
Instance_t inst , //!< identification de l'instance
|
|
||||||
L2_ID L2_id , //!< L2_id of the FC/CH
|
|
||||||
unsigned int NB_chan , //!< Number of channels
|
|
||||||
unsigned int *occ_channels , //!< vector on wich the selected frequencies will be saved //mod_lor_10_05_18
|
|
||||||
CHANNELS_DB_T *channels , //!< List of channels
|
|
||||||
Transaction_t Trans_id //!< Transaction ID
|
|
||||||
)
|
|
||||||
{
|
|
||||||
rrm_t *rrm = &rrm_inst[inst] ;
|
|
||||||
unsigned int NB_occ_chan = 0 ;
|
|
||||||
//unsigned int occ_channels[NB_chan];
|
|
||||||
CHANNELS_DB_T *chann_checked;
|
|
||||||
CHANNEL_T ass_channels[NB_chan];
|
|
||||||
//printf("In update_open_freq: NB_chan: %d\n",NB_chan);
|
|
||||||
pthread_mutex_lock( &( rrm->rrc.exclu ) ) ; //mod_lor_10_03_08
|
|
||||||
del_all_channels( &(rrm->rrc.pChannelsEntry) ) ; //mod_lor_10_06_01
|
|
||||||
|
|
||||||
for (int i=0; i<NB_chan; i++) {
|
|
||||||
//mod_lor_10_05_17++
|
|
||||||
// fprintf(stderr, "update channel : %d that is %d\n",channels[i].channel.Ch_id, channels[i].is_free);//dbg
|
|
||||||
chann_checked = up_chann_db( &(rrm->rrc.pChannelsEntry), channels[i].channel, channels[i].is_free, 0);
|
|
||||||
|
|
||||||
if(chann_checked == NULL) //info_time still to evaluate
|
|
||||||
fprintf(stderr, "error in updating free channels in BTS \n");
|
|
||||||
|
|
||||||
/* else if (chann_checked->is_ass && !(chann_checked->is_free)){
|
|
||||||
fprintf(stderr, " -> Channel %d in use not free anymore! \n",channels[i].channel.Ch_id);
|
|
||||||
chann_checked->is_ass = 0;
|
|
||||||
}else if (chann_checked->is_ass && chann_checked->is_free){
|
|
||||||
ass_channels[NB_occ_chan]=chann_checked->channel;
|
|
||||||
occ_channels[NB_occ_chan]=chann_checked->channel.Ch_id ;
|
|
||||||
NB_occ_chan++;
|
|
||||||
}*/
|
|
||||||
}
|
|
||||||
|
|
||||||
pthread_mutex_unlock( &( rrm->rrc.exclu ) ) ; //mod_lor_10_03_08
|
|
||||||
|
|
||||||
while (NB_occ_chan<CH_NEEDED_FOR_SN) {
|
|
||||||
chann_checked=select_new_channel( rrm->rrc.pChannelsEntry, rrm->L2_id, rrm->L2_id);
|
|
||||||
|
|
||||||
if (chann_checked == NULL) {
|
|
||||||
//fprintf(stderr, "Channel is null \n"); //dbg
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
ass_channels[NB_occ_chan]=chann_checked->channel;
|
|
||||||
occ_channels[NB_occ_chan]=chann_checked->channel.Ch_id ;
|
|
||||||
NB_occ_chan++;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*fprintf(stderr, "Channels for SN selected by BTS: \n"); //dbg
|
|
||||||
for (int i=0; i<NB_occ_chan;i++)//dbg
|
|
||||||
fprintf(stderr, " %d ", occ_channels[i]);//dbg
|
|
||||||
fprintf(stderr, "\n");//dbg*/
|
|
||||||
|
|
||||||
//mod_lor_10_05_17--
|
|
||||||
|
|
||||||
|
|
||||||
pthread_mutex_lock( &( rrm->ip.exclu ) ) ;
|
|
||||||
rrm->ip.trans_cnt++ ;
|
|
||||||
PUT_IP_MSG(msg_update_SN_occ_freq_5( inst, rrm->L2_id, NB_occ_chan, occ_channels, rrm->ip.trans_cnt));
|
|
||||||
pthread_mutex_unlock( &( rrm->ip.exclu ) ) ;
|
|
||||||
|
|
||||||
//AAA: BTS sends a vector containing the channels that have to be used by secondary users
|
|
||||||
pthread_mutex_lock( &( rrm->rrc.exclu ) ) ;
|
|
||||||
//printf("In update_open_freq: NB_chan passed: %d\n",NB_occ_chan);
|
|
||||||
PUT_RRC_MSG(msg_rrm_up_freq_ass( inst, rrm->L2_id, NB_occ_chan, ass_channels));
|
|
||||||
pthread_mutex_unlock( &( rrm->rrc.exclu ) ) ;
|
|
||||||
|
|
||||||
return (NB_occ_chan);//mod_lor_10_05_18
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
|
||||||
\brief RRC update secondary network frequencies in use (SENDORA first scenario)
|
|
||||||
*/
|
|
||||||
unsigned int update_SN_occ_freq( //mod_lor_10_05_18
|
|
||||||
Instance_t inst , //!< instance ID
|
|
||||||
L2_ID L2_id , //!< Layer 2 (MAC) ID of BTS
|
|
||||||
unsigned int NB_chan , //!< number of channels used by secondary network
|
|
||||||
unsigned int *occ_channels , //!< channels used by secondary network
|
|
||||||
Transaction_t Trans_id //!< Transaction ID
|
|
||||||
)
|
|
||||||
|
|
||||||
{
|
|
||||||
rrm_t *rrm = &rrm_inst[inst] ;
|
|
||||||
pthread_mutex_lock( &( rrm->ip.exclu ) ) ; //mod_lor_10_05_18
|
|
||||||
rrm->ip.waiting_SN_update=0; //mod_lor_10_05_18
|
|
||||||
pthread_mutex_unlock( &( rrm->ip.exclu ) ) ;//mod_lor_10_05_18
|
|
||||||
pthread_mutex_lock( &( rrm->rrc.exclu ) ) ; //mod_lor_10_03_08
|
|
||||||
CHANNELS_DB_T *pChannelsEntry=rrm->rrc.pChannelsEntry;
|
|
||||||
CHANNELS_DB_T *pChannels;
|
|
||||||
unsigned int need_to_update = 0;
|
|
||||||
|
|
||||||
//Sens_node_t *nodes_db = rrm->rrc.pSensEntry;
|
|
||||||
//fprintf(stderr,"update_SN_occ_freq %d \n", inst);//dbg
|
|
||||||
//for (pChannels = rrm->rrc.pChannelsEntry; pChannels!=NULL; pChannels=pChannels->next)//dbg
|
|
||||||
// fprintf(stderr,"channel %d in db\n", pChannels->channel.Ch_id);//dbg
|
|
||||||
for (int i=0; i<NB_chan ; i++) { //&& !need_to_update
|
|
||||||
//mod_lor_10_05_28++
|
|
||||||
//fprintf(stderr,"occ_channels %d val %d\n", i,occ_channels[i]);//dbg
|
|
||||||
need_to_update = check_SN_channels(rrm->rrc.pSensEntry,rrm->rrc.pChannelsEntry,occ_channels,NB_chan);
|
|
||||||
|
|
||||||
if (need_to_update==0) {
|
|
||||||
pChannels = up_chann_ass( pChannelsEntry , occ_channels[i], 1, L2_id, L2_id );
|
|
||||||
|
|
||||||
if (pChannels==NULL)
|
|
||||||
printf ("ERROR! Channel not updated\n");
|
|
||||||
}
|
|
||||||
|
|
||||||
//mod_lor_10_05_28--
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
pthread_mutex_unlock( &( rrm->rrc.exclu ) ) ; //mod_lor_10_03_08
|
|
||||||
|
|
||||||
return (need_to_update); //mod_lor_10_05_17
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!//add_lor_10_10_28
|
|
||||||
*******************************************************************************
|
|
||||||
\brief User ask for frequency
|
|
||||||
* it checks available channels to attribute channels to users. It sends an
|
|
||||||
* update message to users with attributed channels
|
|
||||||
*/
|
|
||||||
unsigned int ask_freq_to_CH(
|
|
||||||
Instance_t inst , //!< identification de l'instance
|
|
||||||
L2_ID L2_id[NB_SENS_MAX] , //!< L2_id of the SU
|
|
||||||
L2_ID L2_id_dest[NB_SENS_MAX], //!< L2_id of the SU dest
|
|
||||||
unsigned int N_users , //!< quality of service required (i.e. number of channels required)
|
|
||||||
Transaction_t Trans_id //!< Transaction ID
|
|
||||||
)
|
|
||||||
{
|
|
||||||
rrm_t *rrm = &rrm_inst[inst] ;
|
|
||||||
unsigned int NB_chan=0, ind = 0, act_us=0;
|
|
||||||
CHANNELS_DB_T *pChannels;
|
|
||||||
CHANNEL_T ass_channels[NB_SENS_MAX];
|
|
||||||
L2_ID source_L2_id[NB_SENS_MAX];
|
|
||||||
L2_ID dest_L2_id[NB_SENS_MAX];
|
|
||||||
|
|
||||||
pthread_mutex_lock( &( rrm->rrc.exclu ) ) ;
|
|
||||||
|
|
||||||
///Identify the number of available channels
|
|
||||||
if (rrm->rrc.pChannelsEntry==NULL) {
|
|
||||||
NB_chan = find_available_channels(rrm->rrc.pSensEntry,&(rrm->rrc.pChannelsEntry));
|
|
||||||
printf ("found channels: %d \n", NB_chan);//dbg
|
|
||||||
}
|
|
||||||
|
|
||||||
///Analysing the list of identified channels
|
|
||||||
pChannels = rrm->rrc.pChannelsEntry;
|
|
||||||
|
|
||||||
while (pChannels!=NULL) {
|
|
||||||
if (pChannels->is_free && !pChannels->is_ass && act_us<N_users) {
|
|
||||||
memcpy(&(ass_channels[ind]) , &(pChannels->channel), sizeof(CHANNEL_T));
|
|
||||||
pChannels = up_chann_ass( rrm->rrc.pChannelsEntry , ass_channels[ind].Ch_id, 1, L2_id[act_us], L2_id_dest[act_us] );
|
|
||||||
//printf ("copied channel: %d start %d end %d\n",ass_channels[ind].Ch_id,ass_channels[ind].Start_f,ass_channels[ind].Final_f);//dbg
|
|
||||||
memcpy(source_L2_id[ind].L2_id , L2_id[act_us].L2_id, sizeof(L2_ID));
|
|
||||||
memcpy(dest_L2_id[ind].L2_id , L2_id_dest[act_us].L2_id, sizeof(L2_ID));
|
|
||||||
ind++;
|
|
||||||
act_us++;
|
|
||||||
} else if (pChannels->is_free && pChannels->is_ass) {
|
|
||||||
memcpy(&(ass_channels[ind]) , &(pChannels->channel), sizeof(CHANNEL_T));
|
|
||||||
memcpy(source_L2_id[ind].L2_id , pChannels->source_id.L2_id, sizeof(L2_ID));
|
|
||||||
memcpy(dest_L2_id[ind].L2_id , pChannels->dest_id.L2_id, sizeof(L2_ID));
|
|
||||||
ind++;
|
|
||||||
}
|
|
||||||
|
|
||||||
pChannels = pChannels->next;
|
|
||||||
}
|
|
||||||
|
|
||||||
pthread_mutex_unlock( &( rrm->rrc.exclu ) ) ;
|
|
||||||
|
|
||||||
|
|
||||||
//printf ( "ind: %d\n",ind);//dbg
|
|
||||||
pthread_mutex_lock( &( rrm->rrc.exclu ) ) ;
|
|
||||||
rrm->rrc.trans_cnt++ ;
|
|
||||||
//PUT_RRC_MSG(msg_rrm_up_freq_ass( inst, source_L2_id[0], 1, ass_channels));//dbg
|
|
||||||
PUT_RRC_MSG(msg_rrm_up_freq_ass_sec( inst, source_L2_id, dest_L2_id, ind, ass_channels));
|
|
||||||
pthread_mutex_unlock( &( rrm->rrc.exclu ) ) ;
|
|
||||||
|
|
||||||
//else
|
|
||||||
// printf ("Error! not enough free channels");
|
|
||||||
if (act_us==N_users)
|
|
||||||
return (0);
|
|
||||||
else {
|
|
||||||
printf ("Not enough free channels. Link not allocated\n");
|
|
||||||
return (N_users-act_us);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*!//add_lor_10_11_03
|
|
||||||
*******************************************************************************
|
|
||||||
\brief Function that prepare information in CH_coll to send to fusion center:
|
|
||||||
is_free depends on the number of information and it is a number between
|
|
||||||
0 and 10 that indicates the probability of busy channel
|
|
||||||
\return 0 if operation ended correctly, 1 if info on sensing channel does not exist
|
|
||||||
*/
|
|
||||||
|
|
||||||
unsigned int take_ch_coll_decision(
|
|
||||||
Sens_node_t *SensDB , //!< pointer to the sensing database
|
|
||||||
Sens_ch_t *finalSensChann, //!< info that will be returned after decision
|
|
||||||
unsigned int Ch_id //!< channel ID
|
|
||||||
|
|
||||||
)
|
|
||||||
{
|
|
||||||
Sens_node_t *pSensNode = SensDB;
|
|
||||||
Sens_ch_t *pSensChann;
|
|
||||||
int i, flag=0;
|
|
||||||
|
|
||||||
for (i = 0; i<NUM_SB; i++) // initialization of is_free vector
|
|
||||||
finalSensChann->is_free[i]=0;
|
|
||||||
|
|
||||||
while (pSensNode!= NULL ) {
|
|
||||||
|
|
||||||
if((pSensChann = get_chann_info( pSensNode->info_hd , Ch_id)) != NULL) {
|
|
||||||
flag++;
|
|
||||||
|
|
||||||
for (i = 0; i<NUM_SB; i++) {
|
|
||||||
//printf (" ch %d is_free %d", i, pSensChann->is_free[i]);
|
|
||||||
if (pSensChann->is_free[i]==1)
|
|
||||||
finalSensChann->is_free[i]+=10;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
pSensNode = pSensNode->next;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (flag==0) // case in which information on the channel requested is not in the database
|
|
||||||
return 1;
|
|
||||||
|
|
||||||
for (i = 0; i<NUM_SB; i++) {
|
|
||||||
finalSensChann->is_free[i]=finalSensChann->is_free[i]/flag;
|
|
||||||
|
|
||||||
///AAA: to change when using weights for collaborating sensing
|
|
||||||
if (finalSensChann->is_free[i]>5)
|
|
||||||
finalSensChann->is_free[i]=1;
|
|
||||||
else
|
|
||||||
finalSensChann->is_free[i]=0;
|
|
||||||
|
|
||||||
// printf ("ch %d is_free %d \n", i, finalSensChann->is_free[i]);
|
|
||||||
}
|
|
||||||
|
|
||||||
finalSensChann->Start_f = pSensChann->Start_f;
|
|
||||||
finalSensChann->Final_f = pSensChann->Final_f;
|
|
||||||
finalSensChann->Ch_id = pSensChann->Ch_id;
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*!add_lor_10_11_09
|
|
||||||
*******************************************************************************
|
|
||||||
\brief CMM user disconnect. Request to disconnect the user.
|
|
||||||
* Sending message to CH in order to stop all communications related to this user
|
|
||||||
* (also stop sensing activity of the user)
|
|
||||||
*/
|
|
||||||
void cmm_user_disc(
|
|
||||||
Instance_t inst //!< identification de l'instance
|
|
||||||
)
|
|
||||||
{
|
|
||||||
rrm_t *rrm = &rrm_inst[inst] ;
|
|
||||||
|
|
||||||
pthread_mutex_lock( &( rrm->ip.exclu ) ) ;
|
|
||||||
rrm->ip.trans_cnt++ ;
|
|
||||||
PUT_IP_MSG(msg_user_disconnect_9( inst, rrm->L2_id, rrm->ip.trans_cnt));
|
|
||||||
pthread_mutex_unlock( &( rrm->ip.exclu ) ) ;
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!add_lor_10_11_09
|
|
||||||
*******************************************************************************
|
|
||||||
\brief CMM user disconnect. Request to disconnect the user.
|
|
||||||
* Sending message to CH in order to stop all communications related to this user
|
|
||||||
* (also stop sensing activity of the user)
|
|
||||||
*/
|
|
||||||
void cmm_link_disc(
|
|
||||||
Instance_t inst ,//!< identification de l'instance
|
|
||||||
Instance_t dest //!< identification du destinataire
|
|
||||||
)
|
|
||||||
{
|
|
||||||
rrm_t *rrm = &rrm_inst[inst] ;
|
|
||||||
rrm_t *rrm_dest = &rrm_inst[dest] ;
|
|
||||||
|
|
||||||
pthread_mutex_lock( &( rrm->ip.exclu ) ) ;
|
|
||||||
rrm->ip.trans_cnt++ ;
|
|
||||||
PUT_IP_MSG(msg_close_link( inst, rrm->L2_id, rrm_dest->L2_id, rrm->ip.trans_cnt));
|
|
||||||
pthread_mutex_unlock( &( rrm->ip.exclu ) ) ;
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!add_lor_10_11_09
|
|
||||||
*******************************************************************************
|
|
||||||
\brief disconnect user. Ch removes all communications of the user
|
|
||||||
*/
|
|
||||||
void disconnect_user(
|
|
||||||
Instance_t inst , //!< identification de l'instance
|
|
||||||
L2_ID L2_id //!< L2_id of the SU
|
|
||||||
)
|
|
||||||
{
|
|
||||||
rrm_t *rrm = &rrm_inst[inst] ;
|
|
||||||
CHANNELS_DB_T *pChannels;
|
|
||||||
L2_ID User_active_L2_id[MAX_USER_NB];
|
|
||||||
L2_ID User_dest_L2_id[MAX_USER_NB];
|
|
||||||
int i, new_free = 0;
|
|
||||||
int chan_up = 0;
|
|
||||||
int all_result;
|
|
||||||
|
|
||||||
///remove waiting communications
|
|
||||||
pthread_mutex_lock( &( rrm->ip.exclu ) ) ;
|
|
||||||
printf ("T1 tot waiting before: %d\n",rrm->ip.users_waiting_update);//dbg
|
|
||||||
|
|
||||||
for(i = 0; i < rrm->ip.users_waiting_update; i++) {
|
|
||||||
if ( L2_ID_cmp(&L2_id, &(rrm->ip.L2_id_wait_users[i][0]))==0 || L2_ID_cmp(&L2_id, &(rrm->ip.L2_id_wait_users[i][1]) )==0 ) {
|
|
||||||
if (i < rrm->ip.users_waiting_update-1) {///check if there are still waiting communications to consider
|
|
||||||
memcpy(rrm->ip.L2_id_wait_users[i][0].L2_id , rrm->ip.L2_id_wait_users[rrm->ip.users_waiting_update-1][0].L2_id, sizeof(L2_ID));
|
|
||||||
memcpy(rrm->ip.L2_id_wait_users[i][1].L2_id , rrm->ip.L2_id_wait_users[rrm->ip.users_waiting_update-1][1].L2_id, sizeof(L2_ID));
|
|
||||||
i--;
|
|
||||||
}
|
|
||||||
|
|
||||||
rrm->ip.users_waiting_update--;
|
|
||||||
printf ("N1 tot waiting: %d\n",rrm->ip.users_waiting_update);//db
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
printf ("T2 tot waiting after: %d\n",rrm->ip.users_waiting_update);//dbg
|
|
||||||
|
|
||||||
///remove active communications
|
|
||||||
pthread_mutex_lock( &( rrm->rrc.exclu ) ) ;
|
|
||||||
pChannels = rrm->rrc.pChannelsEntry;
|
|
||||||
|
|
||||||
while (pChannels!=NULL) {
|
|
||||||
if (pChannels->is_ass && ( L2_ID_cmp(&L2_id, &(pChannels->source_id))==0 || L2_ID_cmp(&L2_id, &(pChannels->dest_id) )==0 )) {
|
|
||||||
pChannels->is_ass = 0;
|
|
||||||
new_free++;
|
|
||||||
//printf ("T3 removed channel: %d\n",pChannels->channel.Ch_id);//dbg
|
|
||||||
}
|
|
||||||
|
|
||||||
pChannels=pChannels->next;
|
|
||||||
}
|
|
||||||
|
|
||||||
pthread_mutex_unlock( &( rrm->rrc.exclu ) ) ;
|
|
||||||
printf("[CH %d]: Communications of user ",rrm->id);
|
|
||||||
|
|
||||||
for ( i=0; i<8; i++)
|
|
||||||
printf("%02X", L2_id.L2_id[i]);
|
|
||||||
|
|
||||||
printf( " removed\n");
|
|
||||||
|
|
||||||
///sending update
|
|
||||||
while (rrm->ip.users_waiting_update > 0 && new_free>0) {
|
|
||||||
memcpy(User_active_L2_id[chan_up].L2_id , rrm->ip.L2_id_wait_users[rrm->ip.users_waiting_update-1][0].L2_id, sizeof(L2_ID));
|
|
||||||
memcpy(User_dest_L2_id[chan_up].L2_id , rrm->ip.L2_id_wait_users[rrm->ip.users_waiting_update-1][1].L2_id, sizeof(L2_ID));
|
|
||||||
chan_up++;
|
|
||||||
new_free--;
|
|
||||||
rrm->ip.users_waiting_update--;
|
|
||||||
printf ("N2 tot waiting: %d\n",rrm->ip.users_waiting_update);//db
|
|
||||||
}
|
|
||||||
|
|
||||||
// printf ("New_free: %d\n",new_free);//dbg
|
|
||||||
all_result = ask_freq_to_CH( inst, User_active_L2_id, User_dest_L2_id,chan_up, 0 ); ///Update of channels
|
|
||||||
|
|
||||||
if (all_result != 0)
|
|
||||||
printf ("Error in reassigning free channels new_free: %d all_result: %d\n",new_free, all_result);//dbg
|
|
||||||
|
|
||||||
pthread_mutex_unlock( &( rrm->ip.exclu ) ) ;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!add_lor_10_11_09
|
|
||||||
*******************************************************************************
|
|
||||||
\brief close link. Ch removes an active (or waiting link)
|
|
||||||
*/
|
|
||||||
int close_active_link(
|
|
||||||
Instance_t inst , //!< identification de l'instance
|
|
||||||
L2_ID L2_id , //!< L2_id of the SU
|
|
||||||
L2_ID L2_id_dest //!< L2_id of the SU dest
|
|
||||||
)
|
|
||||||
{
|
|
||||||
rrm_t *rrm = &rrm_inst[inst] ;
|
|
||||||
CHANNELS_DB_T *pChannels;
|
|
||||||
int i, new_free = 0;
|
|
||||||
int all_result;
|
|
||||||
int removed = 0;
|
|
||||||
|
|
||||||
///check waiting communications
|
|
||||||
pthread_mutex_lock( &( rrm->ip.exclu ) ) ;
|
|
||||||
printf ("T1 tot waiting before: %d\n",rrm->ip.users_waiting_update);//dbg
|
|
||||||
|
|
||||||
for(i = 0; i < rrm->ip.users_waiting_update && removed == 0; i++) {
|
|
||||||
if ( (L2_ID_cmp(&L2_id, &(rrm->ip.L2_id_wait_users[i][0]))==0 && L2_ID_cmp(&L2_id_dest, &(rrm->ip.L2_id_wait_users[i][1]) )==0 ) || (L2_ID_cmp(&L2_id, &(rrm->ip.L2_id_wait_users[i][1]))==0
|
|
||||||
&& L2_ID_cmp(&L2_id_dest, &(rrm->ip.L2_id_wait_users[i][0]) )==0 )) {
|
|
||||||
removed = 1;
|
|
||||||
|
|
||||||
if (i < rrm->ip.users_waiting_update-1) {///check if there are still waiting communications to consider
|
|
||||||
memcpy(rrm->ip.L2_id_wait_users[i][0].L2_id , rrm->ip.L2_id_wait_users[rrm->ip.users_waiting_update-1][0].L2_id, sizeof(L2_ID));
|
|
||||||
memcpy(rrm->ip.L2_id_wait_users[i][1].L2_id , rrm->ip.L2_id_wait_users[rrm->ip.users_waiting_update-1][1].L2_id, sizeof(L2_ID));
|
|
||||||
i--;
|
|
||||||
}
|
|
||||||
|
|
||||||
rrm->ip.users_waiting_update--;
|
|
||||||
printf ("T1bis tot waiting inside: %d\n",rrm->ip.users_waiting_update);//dbg
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
printf ("T2 tot waiting after: %d removed %d\n",rrm->ip.users_waiting_update, removed);//dbg
|
|
||||||
pthread_mutex_unlock( &( rrm->ip.exclu ) ) ;
|
|
||||||
|
|
||||||
|
|
||||||
///check active communications
|
|
||||||
pthread_mutex_lock( &( rrm->rrc.exclu ) ) ;
|
|
||||||
pChannels = rrm->rrc.pChannelsEntry;
|
|
||||||
|
|
||||||
while (removed == 0 && pChannels!=NULL) {
|
|
||||||
if (pChannels->is_ass && ( (L2_ID_cmp(&L2_id, &(pChannels->source_id))==0
|
|
||||||
&& L2_ID_cmp(&L2_id_dest, &(pChannels->dest_id) )==0 ) /*|| (L2_ID_cmp(&L2_id, &(pChannels->dest_id))==0 && L2_ID_cmp(&L2_id_dest, &(pChannels->source_id) )==0 )*/)) { //mod_lor_07_12_10
|
|
||||||
pChannels->is_ass = 0;
|
|
||||||
new_free++;
|
|
||||||
removed = 1;
|
|
||||||
printf ("T3 removed channel: %d\n",pChannels->channel.Ch_id);//dbg
|
|
||||||
}
|
|
||||||
|
|
||||||
pChannels=pChannels->next;
|
|
||||||
}
|
|
||||||
|
|
||||||
pthread_mutex_unlock( &( rrm->rrc.exclu ) ) ;
|
|
||||||
|
|
||||||
///link does not exist
|
|
||||||
if (removed == 0) {
|
|
||||||
printf("[CH %d]: Requested link to remove does not exist.\n ",rrm->id);
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
printf("[CH %d]: Link between ",rrm->id);
|
|
||||||
|
|
||||||
for ( i=0; i<8; i++)
|
|
||||||
printf("%02X", L2_id.L2_id[i]);
|
|
||||||
|
|
||||||
printf( " and ");
|
|
||||||
|
|
||||||
for ( i=0; i<8; i++)
|
|
||||||
printf("%02X", L2_id_dest.L2_id[i]);
|
|
||||||
|
|
||||||
printf( " removed\n");
|
|
||||||
|
|
||||||
///sending update only if channel removed among active links
|
|
||||||
if (new_free>0 && removed) {
|
|
||||||
pthread_mutex_lock( &( rrm->ip.exclu ) ) ;
|
|
||||||
printf ("New_free: %d\n",new_free);//dbg
|
|
||||||
//rrm->ip.users_waiting_update--; //mod_lor_10_12_09
|
|
||||||
printf ("N3 tot waiting: %d\n",rrm->ip.users_waiting_update);//db
|
|
||||||
|
|
||||||
if(rrm->ip.users_waiting_update>0)//mod_lor_10_12_09
|
|
||||||
all_result = ask_freq_to_CH( inst, &(rrm->ip.L2_id_wait_users[rrm->ip.users_waiting_update][0]), &(rrm->ip.L2_id_wait_users[rrm->ip.users_waiting_update][1]), 1, 0 ); ///Update of channels
|
|
||||||
else//mod_lor_10_12_09
|
|
||||||
all_result = ask_freq_to_CH( inst, &(rrm->ip.L2_id_wait_users[rrm->ip.users_waiting_update][0]), &(rrm->ip.L2_id_wait_users[rrm->ip.users_waiting_update][1]), 0,
|
|
||||||
0 ); ///Update of channels//mod_lor_10_12_09
|
|
||||||
|
|
||||||
if (all_result != 0)
|
|
||||||
printf ("Error in reassigning free channels new_free: %d all_result: %d\n",new_free, all_result);//dbg
|
|
||||||
|
|
||||||
pthread_mutex_unlock( &( rrm->ip.exclu ) ) ;
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
@@ -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 freq_ass_op.h
|
|
||||||
|
|
||||||
\brief Fichier d'entete contenant les declarations des types, des defines ,
|
|
||||||
et des fonctions relatives a la gestion des frequences.
|
|
||||||
|
|
||||||
\author IACOBELLI Lorenzo
|
|
||||||
|
|
||||||
\date 21/10/09
|
|
||||||
|
|
||||||
|
|
||||||
\par Historique:
|
|
||||||
$Author$ $Date$ $Revision$
|
|
||||||
$Id$
|
|
||||||
$Log$
|
|
||||||
|
|
||||||
*******************************************************************************
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef FREQ_ASS_OP_H
|
|
||||||
#define FREQ_ASS_OP_H
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
//mod_lor_10_05_28: declaration of function for sensing and frequency allocation
|
|
||||||
unsigned int evalaute_sens_info(
|
|
||||||
Sens_node_t *Sens_db,
|
|
||||||
unsigned int Start_f,
|
|
||||||
unsigned int Final_f
|
|
||||||
);
|
|
||||||
|
|
||||||
void take_decision(
|
|
||||||
Sens_node_t *SensDB , //!< pointer to the sensing database
|
|
||||||
unsigned int Ch_id , //!< channel ID
|
|
||||||
unsigned int *is_free //mod_lor_10_05_28 ->char instead of int
|
|
||||||
|
|
||||||
);
|
|
||||||
|
|
||||||
unsigned int take_decision_sens(
|
|
||||||
Sens_node_t *SensDB , //!< pointer to the sensing database
|
|
||||||
Sens_ch_t *finalSensChann, //!< info that will be returned after decision
|
|
||||||
unsigned int Ch_id //!< channel ID
|
|
||||||
|
|
||||||
);
|
|
||||||
|
|
||||||
unsigned int find_available_channels(
|
|
||||||
Sens_node_t *Sens_db,
|
|
||||||
CHANNELS_DB_T **channels_db
|
|
||||||
);
|
|
||||||
|
|
||||||
unsigned int check_SN_channels(
|
|
||||||
Sens_node_t *Sens_db,
|
|
||||||
CHANNELS_DB_T *channels_db,
|
|
||||||
unsigned int *used_channels,
|
|
||||||
unsigned int nb_used_ch
|
|
||||||
);
|
|
||||||
|
|
||||||
void take_local_decision(
|
|
||||||
Sens_ch_t *Sens_info
|
|
||||||
);
|
|
||||||
|
|
||||||
unsigned int take_ch_coll_decision(
|
|
||||||
Sens_node_t *SensDB , //!< pointer to the sensing database
|
|
||||||
Sens_ch_t *finalSensChann, //!< info that will be returned after decision
|
|
||||||
unsigned int Ch_id //!< channel ID
|
|
||||||
);
|
|
||||||
|
|
||||||
void disconnect_user(
|
|
||||||
Instance_t inst , //!< identification de l'instance
|
|
||||||
L2_ID L2_id //!< L2_id of the SU
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif /* FREQ_ASS_OP_H */
|
|
||||||
@@ -1,524 +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 ip_msg.c
|
|
||||||
|
|
||||||
\brief Fonctions permettant le formattage des donnees pour l'envoi d'un
|
|
||||||
message sur le socket entre le RRC et le RRM
|
|
||||||
|
|
||||||
\author IACOBELLI Lorenzo
|
|
||||||
|
|
||||||
\date 27/04/10
|
|
||||||
|
|
||||||
|
|
||||||
\par Historique:
|
|
||||||
|
|
||||||
|
|
||||||
*******************************************************************************
|
|
||||||
*/
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <errno.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <unistd.h>
|
|
||||||
|
|
||||||
#include <sys/socket.h>
|
|
||||||
#include <sys/un.h>
|
|
||||||
|
|
||||||
#include "L3_rrc_defs.h"
|
|
||||||
#include "rrm_sock.h"
|
|
||||||
#include "L3_rrc_interface.h"
|
|
||||||
#include "ip_msg.h"
|
|
||||||
#include "rrm_util.h"
|
|
||||||
|
|
||||||
#ifdef TRACE
|
|
||||||
//! Macro creant la chaine a partir du nom de la variable
|
|
||||||
#define STRINGIZER(x) #x
|
|
||||||
//! Tableau pour le mode trace faisant la translation entre le numero et le nom du message
|
|
||||||
const char *Str_msg_ip[NB_MSG_IP] = {
|
|
||||||
STRINGIZER(UPDATE_SENS_RESULTS_3 ),
|
|
||||||
STRINGIZER(OPEN_FREQ_QUERY_4 ),
|
|
||||||
STRINGIZER(UPDATE_OPEN_FREQ_7 ),
|
|
||||||
STRINGIZER(UPDATE_SN_OCC_FREQ_5 ),
|
|
||||||
STRINGIZER(INIT_COLL_SENS_REQ ),
|
|
||||||
STRINGIZER(STOP_COLL_SENS ),
|
|
||||||
STRINGIZER(UP_CLUST_SENS_RESULTS ),
|
|
||||||
STRINGIZER(STOP_COLL_SENS_CONF ),
|
|
||||||
STRINGIZER(ASK_FREQ_TO_CH_3 ),
|
|
||||||
STRINGIZER(USER_DISCONNECT_9 ),
|
|
||||||
STRINGIZER(CLOSE_LINK )/*,
|
|
||||||
STRINGIZER(RRC_CLUST_SCAN_REQ ),
|
|
||||||
STRINGIZER(RRM_CLUST_SCAN_CONF ),
|
|
||||||
STRINGIZER(RRM_CLUST_MON_REQ ),
|
|
||||||
STRINGIZER(RRC_CLUST_MON_REQ ),
|
|
||||||
STRINGIZER(RRM_CLUST_MON_CONF ),
|
|
||||||
STRINGIZER(RRM_END_SCAN_CONF ),
|
|
||||||
STRINGIZER(RRM_INIT_CONN_REQ ),
|
|
||||||
STRINGIZER(RRC_INIT_CONN_CONF ),
|
|
||||||
STRINGIZER(RRM_FREQ_ALL_PROP ),
|
|
||||||
STRINGIZER(RRC_FREQ_ALL_PROP_CONF ),
|
|
||||||
STRINGIZER(RRM_REP_FREQ_ALL ),
|
|
||||||
STRINGIZER(RRC_REP_FREQ_ACK ),
|
|
||||||
STRINGIZER(RRC_INIT_CONN_REQ ),
|
|
||||||
STRINGIZER(RRM_CONN_SET ),
|
|
||||||
STRINGIZER(RRC_FREQ_ALL_PROP ),
|
|
||||||
STRINGIZER(RRM_FREQ_ALL_PROP_CONF ),
|
|
||||||
STRINGIZER(RRC_REP_FREQ_ALL ),
|
|
||||||
STRINGIZER(RRM_REP_FREQ_ACK ) */
|
|
||||||
|
|
||||||
} ;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief This function initialize the message header
|
|
||||||
\return any return value
|
|
||||||
*/
|
|
||||||
static void init_ip_msg_head(
|
|
||||||
msg_head_t *msg_head , //!< message header to initialize
|
|
||||||
Instance_t inst , //!< Instance ID
|
|
||||||
MSG_IP_T msg_type , //!< type of message to initialize
|
|
||||||
unsigned int size , //!< size of message
|
|
||||||
Transaction_t Trans_id //!< transaction id associated to this message
|
|
||||||
)
|
|
||||||
{
|
|
||||||
if ( msg_head != NULL ) {
|
|
||||||
msg_head->start = START_MSG ;
|
|
||||||
msg_head->msg_type = 0xFF & msg_type ;
|
|
||||||
msg_head->inst = inst ;
|
|
||||||
msg_head->Trans_id = Trans_id ;
|
|
||||||
msg_head->size = size;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief La fonction formate en un message les parametres de la fonction
|
|
||||||
update_sens_results().
|
|
||||||
\return message formate
|
|
||||||
*/
|
|
||||||
|
|
||||||
msg_t *msg_update_sens_results_3(
|
|
||||||
Instance_t inst,
|
|
||||||
L2_ID L2_id, //!< FC L2_id
|
|
||||||
unsigned int NB_info,
|
|
||||||
Sens_ch_t *Sens_meas,
|
|
||||||
Transaction_t Trans_id
|
|
||||||
)
|
|
||||||
{
|
|
||||||
msg_t *msg = RRM_CALLOC(msg_t , 1 ) ;
|
|
||||||
|
|
||||||
if ( msg != NULL ) {
|
|
||||||
unsigned int size = sizeof( rrm_update_sens_t );// + (NB_info-1) * sizeof(Sens_ch_t) ; //mod_lor_10_04_23
|
|
||||||
|
|
||||||
rrm_update_sens_t *p = RRM_CALLOC2(rrm_update_sens_t , size ) ;
|
|
||||||
|
|
||||||
if ( p != NULL ) {
|
|
||||||
//fprintf(stderr,"rrmUSR 1 \n");//dbg
|
|
||||||
init_ip_msg_head(&(msg->head),inst, UPDATE_SENS_RESULTS_3, size ,Trans_id);
|
|
||||||
|
|
||||||
memcpy( p->L2_id.L2_id, L2_id.L2_id, sizeof(L2_ID) ) ;
|
|
||||||
|
|
||||||
p->NB_info = NB_info ;
|
|
||||||
p->info_time = 0 ;
|
|
||||||
|
|
||||||
if ( NB_info > 0 ) {
|
|
||||||
memcpy( p->Sens_meas , Sens_meas, NB_info * sizeof(Sens_ch_t) ) ;
|
|
||||||
}
|
|
||||||
|
|
||||||
//fprintf(stdout,"msg_rrm_update_sens()2 : NB_chan %d\n", p->NB_info);//dbg
|
|
||||||
//fprintf(stdout,"NB_chan %d\n", p->NB_info);
|
|
||||||
// for (int i=0; i<NB_info; i++)
|
|
||||||
// Sens_ch_t *ch = p->Sens_meas; ch!=NULL; ch=ch->next)
|
|
||||||
//fprintf(stdout,"channel in msg arr: %d\n", ch->Ch_id); //dbg
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
//fprintf(stderr,"rrmUSR end \n");//dbg
|
|
||||||
msg->data = (char *) p ;
|
|
||||||
}
|
|
||||||
|
|
||||||
return msg ;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief La fonction formate en un message les parametres de la fonction
|
|
||||||
open_freq_query_4().
|
|
||||||
\return message formate
|
|
||||||
*/
|
|
||||||
msg_t *msg_open_freq_query_4(
|
|
||||||
Instance_t inst,
|
|
||||||
L2_ID L2_id ,
|
|
||||||
QOS_CLASS_T QoS ,
|
|
||||||
Transaction_t Trans_id
|
|
||||||
)
|
|
||||||
{
|
|
||||||
msg_t *msg = RRM_CALLOC(msg_t , 1 ) ;
|
|
||||||
|
|
||||||
if ( msg != NULL ) {
|
|
||||||
open_freq_query_t *p = RRM_CALLOC(open_freq_query_t , 1 ) ;
|
|
||||||
|
|
||||||
if ( p != NULL ) {
|
|
||||||
init_ip_msg_head(&(msg->head),inst,OPEN_FREQ_QUERY_4, sizeof( open_freq_query_t ) ,Trans_id);
|
|
||||||
memcpy( p->L2_id.L2_id, L2_id.L2_id, sizeof(L2_ID) ) ;
|
|
||||||
p->QoS = QoS;
|
|
||||||
}
|
|
||||||
|
|
||||||
msg->data = (char *) p ;
|
|
||||||
}
|
|
||||||
|
|
||||||
return msg ;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief La fonction formate en un message les parametres de la fonction
|
|
||||||
ask_freq_to_CH_3().
|
|
||||||
\return message formate
|
|
||||||
*/
|
|
||||||
msg_t *msg_ask_freq_to_CH_3(
|
|
||||||
Instance_t inst,
|
|
||||||
L2_ID L2_id ,
|
|
||||||
L2_ID L2_id_dest ,
|
|
||||||
QOS_CLASS_T QoS ,
|
|
||||||
Transaction_t Trans_id
|
|
||||||
)
|
|
||||||
{
|
|
||||||
msg_t *msg = RRM_CALLOC(msg_t , 1 ) ;
|
|
||||||
|
|
||||||
if ( msg != NULL ) {
|
|
||||||
ask_freq_to_CH_t *p = RRM_CALLOC(ask_freq_to_CH_t , 1 ) ;
|
|
||||||
|
|
||||||
if ( p != NULL ) {
|
|
||||||
init_ip_msg_head(&(msg->head),inst,ASK_FREQ_TO_CH_3, sizeof( ask_freq_to_CH_t ) ,Trans_id);
|
|
||||||
memcpy( p->L2_id.L2_id, L2_id.L2_id, sizeof(L2_ID) ) ;
|
|
||||||
memcpy( p->L2_id_dest.L2_id, L2_id_dest.L2_id, sizeof(L2_ID) ) ;
|
|
||||||
p->QoS = QoS;
|
|
||||||
}
|
|
||||||
|
|
||||||
msg->data = (char *) p ;
|
|
||||||
}
|
|
||||||
|
|
||||||
return msg ;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief La fonction formate en un message les parametres de la fonction
|
|
||||||
rrm_open_freq().
|
|
||||||
\return message formate
|
|
||||||
*/
|
|
||||||
msg_t *msg_update_open_freq_7(
|
|
||||||
Instance_t inst,
|
|
||||||
L2_ID L2_id ,
|
|
||||||
unsigned int NB_ch,
|
|
||||||
CHANNELS_DB_T *channels, //mod_lor_10_05_17
|
|
||||||
Transaction_t Trans_id
|
|
||||||
)
|
|
||||||
{
|
|
||||||
msg_t *msg = RRM_CALLOC(msg_t , 1 ) ;
|
|
||||||
|
|
||||||
if ( msg != NULL ) {
|
|
||||||
unsigned int size = sizeof( update_open_freq_t );// + (NB_free_ch-1) * sizeof(CHANNEL_T) ;//mod_lor_10_04_23
|
|
||||||
|
|
||||||
update_open_freq_t *p = RRM_CALLOC2(update_open_freq_t , size ) ;
|
|
||||||
|
|
||||||
if ( p != NULL ) {
|
|
||||||
init_ip_msg_head(&(msg->head),inst,UPDATE_OPEN_FREQ_7, size ,Trans_id);
|
|
||||||
memcpy( p->L2_id.L2_id, L2_id.L2_id, sizeof(L2_ID) ) ;
|
|
||||||
p->NB_chan = NB_ch ;
|
|
||||||
|
|
||||||
if ( NB_ch > 0 ) {
|
|
||||||
memcpy( p->channels , channels, NB_ch * sizeof(CHANNELS_DB_T) ) ;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
msg->data = (char *) p ;
|
|
||||||
}
|
|
||||||
|
|
||||||
return msg ;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief La fonction formate en un message les parametres de la fonction
|
|
||||||
rrm_update_SN_freq().
|
|
||||||
\return message formate
|
|
||||||
*/
|
|
||||||
|
|
||||||
msg_t *msg_update_SN_occ_freq_5(
|
|
||||||
Instance_t inst , //!< instance ID
|
|
||||||
L2_ID L2_id , //!< Layer 2 (MAC) ID of FC
|
|
||||||
unsigned int NB_chan ,
|
|
||||||
unsigned int *occ_channels ,
|
|
||||||
Transaction_t Trans_id //!< Transaction ID
|
|
||||||
)
|
|
||||||
|
|
||||||
{
|
|
||||||
msg_t *msg = RRM_CALLOC(msg_t , 1 ) ;
|
|
||||||
//fprintf(stdout,"rrc_end_scan_ord() cp1\n"); //dbg
|
|
||||||
|
|
||||||
if ( msg != NULL ) {
|
|
||||||
unsigned int size = sizeof( update_SN_occ_freq_t );// + (NB_chan-1) * sizeof(unsigned int) ;//mod_lor_10_04_23
|
|
||||||
update_SN_occ_freq_t *p = RRM_CALLOC2(update_SN_occ_freq_t , size ) ;
|
|
||||||
|
|
||||||
if ( p != NULL ) {
|
|
||||||
|
|
||||||
|
|
||||||
init_ip_msg_head(&(msg->head),inst,UPDATE_SN_OCC_FREQ_5, size,Trans_id);
|
|
||||||
|
|
||||||
memcpy( p->L2_id.L2_id, L2_id.L2_id, sizeof(L2_ID) ) ;
|
|
||||||
|
|
||||||
|
|
||||||
p->NB_chan = NB_chan;
|
|
||||||
|
|
||||||
if ( NB_chan != 0 ) {
|
|
||||||
|
|
||||||
memcpy( p->occ_channels, occ_channels, NB_chan*sizeof(unsigned int) );
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
msg->data = (char *) p ;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
return msg ;
|
|
||||||
}
|
|
||||||
|
|
||||||
//mod_lor_10_05_05++
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief Message to be sent to a CH that will collaborate in sensing operation.
|
|
||||||
\return message formate
|
|
||||||
*/
|
|
||||||
msg_t *msg_init_coll_sens_req(
|
|
||||||
Instance_t inst, //!< instance ID of asking CH
|
|
||||||
L2_ID L2_id , //!< Layer 2 (MAC) ID of asking CH
|
|
||||||
unsigned int Start_fr,
|
|
||||||
unsigned int Stop_fr,
|
|
||||||
unsigned int Meas_band,
|
|
||||||
unsigned int Meas_tpf,
|
|
||||||
unsigned int Nb_channels,
|
|
||||||
unsigned int Overlap,
|
|
||||||
unsigned int Sampl_freq,
|
|
||||||
Transaction_t Trans_id //!< Transaction ID
|
|
||||||
)
|
|
||||||
{
|
|
||||||
msg_t *msg = RRM_CALLOC(msg_t , 1 ) ;
|
|
||||||
|
|
||||||
if ( msg != NULL ) {
|
|
||||||
init_coll_sens_req_t *p = RRM_CALLOC(init_coll_sens_req_t , 1 ) ;
|
|
||||||
|
|
||||||
if ( p != NULL ) {
|
|
||||||
init_ip_msg_head(&(msg->head),inst, INIT_COLL_SENS_REQ, sizeof( init_coll_sens_req_t) ,0);
|
|
||||||
memcpy( p->L2_id.L2_id, L2_id.L2_id, sizeof(L2_ID) ) ;
|
|
||||||
p->Start_fr = Start_fr;
|
|
||||||
p->Stop_fr = Stop_fr;
|
|
||||||
p->Meas_band = Meas_band;
|
|
||||||
p->Meas_tpf = Meas_tpf;
|
|
||||||
p->Nb_channels = Nb_channels;
|
|
||||||
p->Overlap = Overlap;
|
|
||||||
p->Sampl_freq = Sampl_freq;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
msg->data = (char *) p ;
|
|
||||||
}
|
|
||||||
|
|
||||||
return msg ;
|
|
||||||
}
|
|
||||||
|
|
||||||
//mod_lor_10_05_05--
|
|
||||||
//mod_lor_10_05_06++
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief La fonction formate en un message les parametres de la fonction
|
|
||||||
cmm_stop_sensing.
|
|
||||||
\return message formate
|
|
||||||
*/
|
|
||||||
msg_t *msg_stop_coll_sens(
|
|
||||||
Instance_t inst //!< identification de l'instance
|
|
||||||
)
|
|
||||||
{
|
|
||||||
msg_t *msg = RRM_CALLOC(msg_t ,1 ) ;
|
|
||||||
|
|
||||||
if ( msg != NULL ) {
|
|
||||||
init_ip_msg_head(&(msg->head),inst,STOP_COLL_SENS, 0 ,0);
|
|
||||||
msg->data = NULL ;
|
|
||||||
}
|
|
||||||
|
|
||||||
return msg ;
|
|
||||||
}
|
|
||||||
//mod_lor_10_05_06--
|
|
||||||
//mod_lor_10_05_12++
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief La fonction formate en un message les parametres de la fonction
|
|
||||||
cmm_stop_sensing.
|
|
||||||
\return message formate
|
|
||||||
*/
|
|
||||||
msg_t *msg_stop_coll_sens_conf(
|
|
||||||
Instance_t inst, //!< identification de l'instance
|
|
||||||
L2_ID L2_id
|
|
||||||
)
|
|
||||||
{
|
|
||||||
msg_t *msg = RRM_CALLOC(msg_t ,1 ) ;
|
|
||||||
|
|
||||||
if ( msg != NULL ) {
|
|
||||||
stop_coll_sens_conf_t *p = RRM_CALLOC(stop_coll_sens_conf_t , 1 ) ;
|
|
||||||
|
|
||||||
if ( p != NULL ) {
|
|
||||||
init_ip_msg_head(&(msg->head),inst,STOP_COLL_SENS_CONF, sizeof( stop_coll_sens_conf_t) ,0);
|
|
||||||
memcpy( p->L2_id.L2_id, L2_id.L2_id, sizeof(L2_ID) ) ;
|
|
||||||
}
|
|
||||||
|
|
||||||
msg->data = (char *) p ;
|
|
||||||
}
|
|
||||||
|
|
||||||
return msg ;
|
|
||||||
}
|
|
||||||
//mod_lor_10_05_12--
|
|
||||||
|
|
||||||
//mod_lor_10_05_07++
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief La fonction formate en un message les parametres de la fonction
|
|
||||||
up_clust_sens_results().
|
|
||||||
\return message formate
|
|
||||||
*/
|
|
||||||
|
|
||||||
msg_t *msg_up_clust_sens_results(
|
|
||||||
Instance_t inst,
|
|
||||||
L2_ID L2_id, //!< FC L2_id
|
|
||||||
unsigned int NB_info,
|
|
||||||
unsigned int info_value,
|
|
||||||
Sens_ch_t *Sens_meas,
|
|
||||||
Transaction_t Trans_id
|
|
||||||
)
|
|
||||||
{
|
|
||||||
msg_t *msg = RRM_CALLOC(msg_t , 1 ) ;
|
|
||||||
|
|
||||||
if ( msg != NULL ) {
|
|
||||||
unsigned int size = sizeof( update_coll_sens_t );// + (NB_info-1) * sizeof(Sens_ch_t) ; //mod_lor_10_04_23
|
|
||||||
|
|
||||||
update_coll_sens_t *p = RRM_CALLOC2(update_coll_sens_t , size ) ;
|
|
||||||
|
|
||||||
if ( p != NULL ) {
|
|
||||||
init_ip_msg_head(&(msg->head),inst, UP_CLUST_SENS_RESULTS, size ,Trans_id);
|
|
||||||
|
|
||||||
memcpy( p->L2_id.L2_id, L2_id.L2_id, sizeof(L2_ID) ) ;
|
|
||||||
|
|
||||||
p->NB_info = NB_info ;
|
|
||||||
p->info_time = 0 ;
|
|
||||||
p->info_value = info_value;
|
|
||||||
|
|
||||||
if ( NB_info > 0 ) {
|
|
||||||
memcpy( p->Sens_meas , Sens_meas, NB_info * sizeof(Sens_ch_t) ) ;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
msg->data = (char *) p ;
|
|
||||||
}
|
|
||||||
|
|
||||||
return msg ;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
//mod_lor_10_05_07--
|
|
||||||
|
|
||||||
/*!add_lor_10_11_09
|
|
||||||
*******************************************************************************
|
|
||||||
\brief La fonction formate en un message les parametres de la fonction
|
|
||||||
user_disconnect.
|
|
||||||
\return message formate
|
|
||||||
*/
|
|
||||||
msg_t *msg_user_disconnect_9(
|
|
||||||
Instance_t inst, //!< identification de l'instance
|
|
||||||
L2_ID L2_id, //!< L2_id of the user that wants to disconnect
|
|
||||||
Transaction_t Trans_id
|
|
||||||
)
|
|
||||||
{
|
|
||||||
msg_t *msg = RRM_CALLOC(msg_t ,1 ) ;
|
|
||||||
|
|
||||||
if ( msg != NULL ) {
|
|
||||||
user_disconnect_t *p = RRM_CALLOC(user_disconnect_t , 1 ) ;
|
|
||||||
|
|
||||||
if ( p != NULL ) {
|
|
||||||
init_ip_msg_head(&(msg->head),inst,USER_DISCONNECT_9, sizeof( user_disconnect_t) ,Trans_id);
|
|
||||||
memcpy( p->L2_id.L2_id, L2_id.L2_id, sizeof(L2_ID) ) ;
|
|
||||||
}
|
|
||||||
|
|
||||||
msg->data = (char *) p ;
|
|
||||||
}
|
|
||||||
|
|
||||||
return msg ;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!add_lor_10_11_09
|
|
||||||
*******************************************************************************
|
|
||||||
\brief La fonction formate en un message les parametres de la fonction
|
|
||||||
user_disconnect.
|
|
||||||
\return message formate
|
|
||||||
*/
|
|
||||||
msg_t *msg_close_link(
|
|
||||||
Instance_t inst, //!< identification de l'instance
|
|
||||||
L2_ID L2_id, //!< L2_id of the user that wants to stop the link
|
|
||||||
L2_ID L2_id_dest, //!< L2_id of the destination
|
|
||||||
Transaction_t Trans_id
|
|
||||||
)
|
|
||||||
{
|
|
||||||
msg_t *msg = RRM_CALLOC(msg_t ,1 ) ;
|
|
||||||
|
|
||||||
if ( msg != NULL ) {
|
|
||||||
close_link_t *p = RRM_CALLOC(close_link_t , 1 ) ;
|
|
||||||
|
|
||||||
if ( p != NULL ) {
|
|
||||||
init_ip_msg_head(&(msg->head),inst,CLOSE_LINK, sizeof( close_link_t) ,Trans_id);
|
|
||||||
memcpy( p->L2_id.L2_id, L2_id.L2_id, sizeof(L2_ID) ) ;
|
|
||||||
memcpy( p->L2_id_dest.L2_id, L2_id_dest.L2_id, sizeof(L2_ID) ) ;
|
|
||||||
}
|
|
||||||
|
|
||||||
msg->data = (char *) p ;
|
|
||||||
}
|
|
||||||
|
|
||||||
return msg ;
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,253 +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 ip_msg.h
|
|
||||||
|
|
||||||
\brief Fichier d'entete contenant les declarations des types, des defines ,
|
|
||||||
et des fonctions relatives aux messages RRC-RRM ou RRC-RRCI.
|
|
||||||
|
|
||||||
Les fonctions servent à créer le buffer de message, remplir
|
|
||||||
l'entete et copier les parametres de fonction. Chaque fonction
|
|
||||||
retourne le message qui pourra être envoye sur le socket entre le
|
|
||||||
CMM et le RRM ou RRCI.
|
|
||||||
|
|
||||||
\author IACOBELLI Lorenzo
|
|
||||||
|
|
||||||
\date 27/04/10
|
|
||||||
|
|
||||||
\par Historique:
|
|
||||||
|
|
||||||
|
|
||||||
*******************************************************************************
|
|
||||||
*/
|
|
||||||
#ifndef __IP_MSG_H
|
|
||||||
#define __IP_MSG_H
|
|
||||||
|
|
||||||
#include "L3_rrc_defs.h"
|
|
||||||
#include "COMMON/mac_rrc_primitives.h"
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef OPENAIR2_IN
|
|
||||||
#include "rrm_sock.h"
|
|
||||||
#else
|
|
||||||
#include "RRC/MESH/rrc_rrm_interface.h"
|
|
||||||
#endif
|
|
||||||
//#include "../../../openair2/RRC/MESH/rrc_rrm_interface.h"
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief Enumeration des messages entre RRM/RRCI et le RRC
|
|
||||||
*/
|
|
||||||
typedef enum {
|
|
||||||
UPDATE_SENS_RESULTS_3 , ///< Message IP : update to send to CH/FC //mod_lor_10_01_25
|
|
||||||
OPEN_FREQ_QUERY_4 , ///< Message IP : BTS to ask free frequencies to FC
|
|
||||||
UPDATE_OPEN_FREQ_7 , ///< Message IP : list of frequencies usable by the secondary network
|
|
||||||
UPDATE_SN_OCC_FREQ_5 , ///< Message IP : BTS sends used freq. to FC
|
|
||||||
INIT_COLL_SENS_REQ , ///< Message IP : CH1 sends request to start collaboration to CH2
|
|
||||||
STOP_COLL_SENS , ///< Message IP : CH1 sends order to stop collaboration to CH2
|
|
||||||
UP_CLUST_SENS_RESULTS , ///< Message IP : update to send to CH from CH_COLL
|
|
||||||
STOP_COLL_SENS_CONF , ///< Message IP : CH2 sends confirmationof stop collaboration to CH1
|
|
||||||
ASK_FREQ_TO_CH_3 , ///< Message IP : user that wants to transmits ask channels to CH
|
|
||||||
USER_DISCONNECT_9 , ///< Message IP : user wants to disconnect
|
|
||||||
CLOSE_LINK , ///< Message IP : user wants to stop a link
|
|
||||||
/*STOP_COLL_SENS , ///< Message RRC->RRM : in FC/CH to report a frequency query
|
|
||||||
RRM_OPEN_FREQ , ///< Message RRM->RRC : FC communicates open frequencies
|
|
||||||
RRM_UPDATE_SN_FREQ , ///< Message RRM->RRC : BTS sends used freq. to FC
|
|
||||||
RRC_UPDATE_SN_FREQ , ///< Message RRC->RRM : FC receives used freq. from BTS
|
|
||||||
RRM_CLUST_SCAN_REQ , ///< Message RRM->RRC : CH1 contacts CH2 to collaborate for the sensing process
|
|
||||||
RRC_CLUST_SCAN_REQ , ///< Message RRC->RRM : CH2 receive request to collaborate for the sensing process from CH1
|
|
||||||
RRM_CLUST_SCAN_CONF , ///< Message RRM->RRC : CH2 confirmrs the beginning of a collaboration process
|
|
||||||
RRM_CLUST_MON_REQ , ///< Message RRM->RRC : CH1 contacts CH2 to collaborate for the monitoring process
|
|
||||||
RRC_CLUST_MON_REQ , ///< Message RRC->RRM : CH2 receive request to collaborate for the monitoring process from CH1
|
|
||||||
RRM_CLUST_MON_CONF , ///< Message RRM->RRC : CH2 confirmrs the beginning of a monitoring process
|
|
||||||
RRM_END_SCAN_CONF , ///< Message RRM->RRC : CH2 confirmrs the end of the collaborative sensing process at CH1
|
|
||||||
RRM_INIT_CONN_REQ , ///< Message RRM->RRC : SU 1 requests a connection to SU 2
|
|
||||||
RRC_INIT_CONN_CONF , ///< Message RRM->RRC : Confirm from SU2 about the requested connection
|
|
||||||
RRM_FREQ_ALL_PROP , ///< Message RRM->RRC : SU1 sends a proposition of teh frequencies to use
|
|
||||||
RRC_FREQ_ALL_PROP_CONF , ///< Message RRC->RRM : SU1 receives a confirm on the usable channels
|
|
||||||
RRM_REP_FREQ_ALL , ///< Message RRM->RRC : SU1 reports to CH the possible channels
|
|
||||||
RRC_REP_FREQ_ACK , ///< Message RRC->RRM : CH informs all SUs about a channel allocated to 2 SUs
|
|
||||||
RRC_INIT_CONN_REQ , ///< Message RRC->RRM : Request from SU1 to establish a connection
|
|
||||||
RRM_CONN_SET , ///< Message RRC->RRM : Response to SU1 and connection settings communicated to rcc
|
|
||||||
RRC_FREQ_ALL_PROP , ///< Message RRC->RRM : SU1 proposition of frequencies to use
|
|
||||||
RRM_FREQ_ALL_PROP_CONF , ///< Message RRC->RRM : SU2 choise of frequencies to use
|
|
||||||
RRC_REP_FREQ_ALL , ///< Message RRM->RRC : SU1 reports to CH the possible channels
|
|
||||||
RRM_REP_FREQ_ACK , ///< Message RRC->RRM : CH informs all SUs about a channel allocated to 2 SUs
|
|
||||||
*/NB_MSG_IP ///< Nombre de message RRM-RRC
|
|
||||||
|
|
||||||
}
|
|
||||||
MSG_IP_T ;
|
|
||||||
|
|
||||||
//mod_lor_10_05_05++
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief Definition des parametres de la fonction init_coll_sens_req() dans
|
|
||||||
une structure permettant le passage des parametres via un socket
|
|
||||||
*/
|
|
||||||
typedef struct {
|
|
||||||
L2_ID L2_id ; //!< Layer 2 (MAC) ID of Fusion Centre
|
|
||||||
unsigned int Start_fr; //!< Lowest frequency considered (MHz)
|
|
||||||
unsigned int Stop_fr; //!< Highest frequency considered (MHz)
|
|
||||||
unsigned int Meas_band; //!< Measurement bandwidth (KHz)
|
|
||||||
unsigned int Meas_tpf; //!< Measurement time per sub-band
|
|
||||||
unsigned int Nb_channels; //!< Number of sub-bands
|
|
||||||
unsigned int Overlap; //!< Overlap factor (%)
|
|
||||||
unsigned int Sampl_freq; //!< Sampling frequency (Ms/s)
|
|
||||||
} init_coll_sens_req_t;
|
|
||||||
//mod_lor_10_05_05--
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief Definition des parametres de les fonctions
|
|
||||||
rrm_update_sens()dans une structure permettant le passage
|
|
||||||
des parametres via un socket
|
|
||||||
*/
|
|
||||||
typedef struct {
|
|
||||||
L2_ID L2_id ; //!< Layer 2 ID (MAC) of sensing node
|
|
||||||
unsigned int NB_info ; //!< Number of sensed channels
|
|
||||||
Sens_ch_t Sens_meas[NB_SENS_MAX] ; //!< Sensing information
|
|
||||||
double info_time ; //!< Data of the information
|
|
||||||
} rrm_update_sens_t ;
|
|
||||||
|
|
||||||
//mod_lor_10_05_07++
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief Definition des parametres de les fonctions
|
|
||||||
rrm_update_sens()dans une structure permettant le passage
|
|
||||||
des parametres via un socket
|
|
||||||
*/
|
|
||||||
typedef struct {
|
|
||||||
L2_ID L2_id ; //!< Layer 2 ID (MAC) of sensing node
|
|
||||||
unsigned int NB_info ; //!< Number of sensed channels
|
|
||||||
unsigned int info_value ; //!< value assigned to information
|
|
||||||
Sens_ch_t Sens_meas[NB_SENS_MAX] ; //!< Sensing information
|
|
||||||
double info_time ; //!< Data of the information
|
|
||||||
} update_coll_sens_t ;
|
|
||||||
//mod_lor_10_05_07--
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief Definition des parametres de les fonctions rrm_ask_for_freq() et rrc_ask_for_freq()dans
|
|
||||||
une structure permettant le passage des parametres via un socket
|
|
||||||
*/
|
|
||||||
typedef struct {
|
|
||||||
L2_ID L2_id ; //!< Layer 2 (MAC) ID of Fusion Centre
|
|
||||||
QOS_CLASS_T QoS ; //!< QoS required; if 0 all QoS at disposition
|
|
||||||
} open_freq_query_t;
|
|
||||||
|
|
||||||
/*! //mod_lor_10_10_29
|
|
||||||
*******************************************************************************
|
|
||||||
\brief Definition des parametres de les fonctions rrm_ask_freq_to_CH() dans
|
|
||||||
une structure permettant le passage des parametres via un socket
|
|
||||||
*/
|
|
||||||
typedef struct {
|
|
||||||
L2_ID L2_id ; //!< Layer 2 (MAC) ID of source user
|
|
||||||
L2_ID L2_id_dest ; //!< Layer 2 (MAC) ID of destination user
|
|
||||||
QOS_CLASS_T QoS ; //!< QoS required; it corresponds to the mumber of channels required
|
|
||||||
} ask_freq_to_CH_t;
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief Definition des parametres de les fonctions
|
|
||||||
rrc_open_freq() et rrm_open_freq() dans une structure permettant le passage
|
|
||||||
des parametres via un socket
|
|
||||||
*/
|
|
||||||
typedef struct {
|
|
||||||
double date;
|
|
||||||
L2_ID L2_id ; //!< Layer 2 ID (MAC) of FC/CH
|
|
||||||
unsigned int NB_chan ; //!< number of channels
|
|
||||||
CHANNELS_DB_T channels[NB_SENS_MAX]; //!< description of channelS
|
|
||||||
} update_open_freq_t;
|
|
||||||
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief Definition des parametres des fonctions rrm_update_SN_freq() et
|
|
||||||
rrm_update_SN_freq()dans
|
|
||||||
une structure permettant le passage des parametres via un socket
|
|
||||||
*/
|
|
||||||
typedef struct {
|
|
||||||
L2_ID L2_id ; //!< Layer 2 (MAC) ID of FC/BTS
|
|
||||||
unsigned int NB_chan ; //!< Number of channels
|
|
||||||
unsigned int occ_channels[NB_SENS_MAX]; //!< Vector of channels
|
|
||||||
} update_SN_occ_freq_t;
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief
|
|
||||||
*/
|
|
||||||
typedef struct {
|
|
||||||
L2_ID L2_id ; //!< Layer 2 (MAC) ID
|
|
||||||
} stop_coll_sens_conf_t, user_disconnect_t; //add_lor_10_11_09
|
|
||||||
|
|
||||||
/*! //add_lor_10_11_09
|
|
||||||
*******************************************************************************
|
|
||||||
\brief
|
|
||||||
*/
|
|
||||||
typedef struct {
|
|
||||||
L2_ID L2_id ; //!< Layer 2 (MAC) ID
|
|
||||||
L2_ID L2_id_dest ; //!< Layer 2 (MAC) ID of dest
|
|
||||||
} close_link_t;
|
|
||||||
|
|
||||||
#ifdef TRACE
|
|
||||||
extern const char *Str_msg_ip[NB_MSG_IP] ;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Rappel : les paramètres sont identiques aux fonctions
|
|
||||||
* (sans le prefixe msg_ ) du fichier: L3_rrc_interface.h
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
///MESSAGES VIA IP
|
|
||||||
msg_t *msg_update_sens_results_3( Instance_t inst, L2_ID L2_id, unsigned int NB_chan, Sens_ch_t *Sens_meas, Transaction_t Trans_id );
|
|
||||||
msg_t *msg_open_freq_query_4( Instance_t inst, L2_ID L2_id, QOS_CLASS_T QoS, Transaction_t Trans_id );
|
|
||||||
msg_t *msg_update_open_freq_7( Instance_t inst, L2_ID L2_id, unsigned int NB_ch, CHANNELS_DB_T *channels, Transaction_t Trans_id);
|
|
||||||
msg_t *msg_update_SN_occ_freq_5( Instance_t inst, L2_ID L2_id, unsigned int NB_chan, unsigned int *occ_channels, Transaction_t Trans_id);
|
|
||||||
msg_t *msg_init_coll_sens_req( Instance_t inst, L2_ID L2_id, unsigned int Start_fr, unsigned int Stop_fr,unsigned int Meas_band,
|
|
||||||
unsigned int Meas_tpf, unsigned int Nb_channels,unsigned int Overlap, unsigned int Sampl_freq, Transaction_t Trans_id ); //mod_lor_10_05_05
|
|
||||||
msg_t *msg_stop_coll_sens( Instance_t inst);//mod_lor_10_05_06
|
|
||||||
msg_t *msg_up_clust_sens_results( Instance_t inst, L2_ID L2_id, unsigned int NB_info,
|
|
||||||
unsigned int info_value, Sens_ch_t *Sens_meas, Transaction_t Trans_id ); //mod_lor_10_05_07
|
|
||||||
msg_t *msg_stop_coll_sens_conf( Instance_t inst, L2_ID L2_id);//mod_lor_10_05_12
|
|
||||||
msg_t *msg_ask_freq_to_CH_3( Instance_t inst, L2_ID L2_id, L2_ID L2_id_dest, QOS_CLASS_T QoS, Transaction_t Trans_id );//mod_lor_10_10_28
|
|
||||||
msg_t *msg_user_disconnect_9( Instance_t inst, L2_ID L2_id, Transaction_t Trans_id); //add_lor_10_11_09
|
|
||||||
msg_t *msg_close_link( Instance_t inst, L2_ID L2_id, L2_ID L2_id_dest, Transaction_t Trans_id); //add_lor_10_11_09
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif /* RRC_MSG_H */
|
|
||||||
@@ -1,312 +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 mr_attach.c
|
|
||||||
|
|
||||||
\brief Fonctions permettant la gestion de l'attachement d'un Mesh Router
|
|
||||||
a un cluster.
|
|
||||||
|
|
||||||
\author BURLOT Pascal
|
|
||||||
|
|
||||||
\date 29/08/08
|
|
||||||
|
|
||||||
|
|
||||||
\par Historique:
|
|
||||||
P.BURLOT 2009-01-20
|
|
||||||
+ separation de la file de message CMM/RRM a envoyer en 2 files
|
|
||||||
distinctes ( file_send_cmm_msg, file_send_rrc_msg)
|
|
||||||
L.IACOBELLI 2009-10-19
|
|
||||||
+ inclusions
|
|
||||||
|
|
||||||
*******************************************************************************
|
|
||||||
*/
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <errno.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <unistd.h>
|
|
||||||
|
|
||||||
#include <sys/socket.h>
|
|
||||||
#include <sys/un.h>
|
|
||||||
|
|
||||||
#include <pthread.h>
|
|
||||||
|
|
||||||
#include "debug.h"
|
|
||||||
#include "L3_rrc_defs.h"
|
|
||||||
#include "L3_rrc_interface.h"
|
|
||||||
#include "cmm_rrm_interface.h"
|
|
||||||
#include "rrm_sock.h"
|
|
||||||
#include "rrc_rrm_msg.h"
|
|
||||||
#include "cmm_msg.h"
|
|
||||||
#include "pusu_msg.h"
|
|
||||||
#include "msg_mngt.h"
|
|
||||||
#include "rb_db.h"
|
|
||||||
#include "neighbor_db.h"
|
|
||||||
#include "sens_db.h"
|
|
||||||
#include "channels_db.h"
|
|
||||||
#include "rrm_util.h"
|
|
||||||
#include "transact.h"
|
|
||||||
#include "rrm_constant.h"
|
|
||||||
#include "rrm.h"
|
|
||||||
#include "mr_attach.h"
|
|
||||||
|
|
||||||
|
|
||||||
//! Met un message dans la file des messages a envoyer
|
|
||||||
#define PUT_CMM_MSG(m) put_msg( &(rrm->file_send_cmm_msg), 0, rrm->cmm.s,m ) //mod_lor_10_01_25
|
|
||||||
#define PUT_PUSU_MSG(m) put_msg( &(rrm->file_send_cmm_msg), 0, rrm->pusu.s,m) //mod_lor_10_01_25
|
|
||||||
#define PUT_RRC_MSG(m) put_msg( &(rrm->file_send_rrc_msg), 0, rrm->rrc.s,m ) //mod_lor_10_01_25
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief MR attachement indication. Sent by RRC to RRM to indicate the MAC ID of
|
|
||||||
a new MR attached to CH at layer 2
|
|
||||||
*/
|
|
||||||
void rrc_MR_attach_ind(
|
|
||||||
Instance_t inst , //!< Identification de l'instance
|
|
||||||
L2_ID L2_id //!< Layer 2 (MAC) ID
|
|
||||||
)
|
|
||||||
{
|
|
||||||
rrm_t *rrm = &rrm_inst[inst] ;
|
|
||||||
|
|
||||||
if ( (rrm->state == CLUSTERHEAD_INIT1 )|| (rrm->state == CLUSTERHEAD )) {
|
|
||||||
pthread_mutex_lock( &( rrm->rrc.exclu ) ) ;
|
|
||||||
add_neighbor( &(rrm->rrc.pNeighborEntry), &L2_id ) ;
|
|
||||||
rrm->rrc.trans_cnt++ ;
|
|
||||||
//fprintf(stderr,"item_trans in RRM_SENSING_MEAS_REQ=%d node %d\n",rrm->rrc.trans_cnt,rrm->id);//dbg
|
|
||||||
add_item_transact( &(rrm->rrc.transaction), rrm->rrc.trans_cnt ,INT_RRC,RRM_SENSING_MEAS_REQ,0,NO_PARENT );
|
|
||||||
pthread_mutex_unlock( &( rrm->rrc.exclu ) ) ;
|
|
||||||
|
|
||||||
PUT_RRC_MSG( msg_rrm_sensing_meas_req( inst, L2_id ,Sensing_meas_desc, rrm->rrc.trans_cnt));
|
|
||||||
|
|
||||||
PUT_CMM_MSG( msg_rrm_MR_attach_ind(inst,L2_id ));
|
|
||||||
} else
|
|
||||||
fprintf(stderr,"[RRM] RRC_MR_ATTACH_IND is not allowed (Only CH):etat=%d\n",rrm->state);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief RRC response to sensing_meas_req
|
|
||||||
*/
|
|
||||||
void rrc_sensing_meas_resp(
|
|
||||||
Instance_t inst , //!< Identification de l'instance
|
|
||||||
Transaction_t Trans_id //!< Transaction ID
|
|
||||||
)
|
|
||||||
{
|
|
||||||
rrm_t *rrm = &rrm_inst[inst] ;
|
|
||||||
|
|
||||||
if ( (rrm->state == CLUSTERHEAD_INIT1 )|| (rrm->state == CLUSTERHEAD ) ) {
|
|
||||||
//fprintf(stderr, "[RRM] RRC_SENSING_MEAS_RESP is not coded %s %d \n",__FILE__ , __LINE__ );
|
|
||||||
|
|
||||||
transact_t *pTransact ;
|
|
||||||
|
|
||||||
pthread_mutex_lock( &( rrm->rrc.exclu ) ) ;
|
|
||||||
pTransact = get_item_transact(rrm->rrc.transaction,Trans_id ) ;
|
|
||||||
|
|
||||||
if ( pTransact == NULL ) {
|
|
||||||
fprintf(stderr,"[RRM] rrc_sensing_meas_resp (%d) unknown transaction\n",Trans_id);
|
|
||||||
pthread_mutex_unlock( &( rrm->rrc.exclu ) ) ;
|
|
||||||
} else {
|
|
||||||
del_item_transact( &(rrm->rrc.transaction),Trans_id ) ;
|
|
||||||
pthread_mutex_unlock( &( rrm->rrc.exclu ) ) ;
|
|
||||||
}
|
|
||||||
} else
|
|
||||||
fprintf(stderr,"[RRM] RRC_SENSING_MEAS_RESP (%d) is not allowed (Only CH):etat=%d\n",Trans_id,rrm->state);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief RRC Connection Establishment indication. Message received by RRM in CH
|
|
||||||
at completion of attachment phase of a new MR (after configuration MR IPAddr).
|
|
||||||
Here L3_info contains MR IPAddr. Message received by RRCI in MR after
|
|
||||||
configuration of initial RBs and reception of CH IPAddr. Here L3_info
|
|
||||||
contains CH IPAddr. For MR the RBID's of basic IP services are also required.
|
|
||||||
*/
|
|
||||||
void rrc_cx_establish_ind(
|
|
||||||
Instance_t inst , //!< Identification de l'instance
|
|
||||||
L2_ID L2_id , //!< Layer 2 (MAC) ID
|
|
||||||
Transaction_t Trans_id , //!< Transaction ID
|
|
||||||
unsigned char *L3_info , //!< Optional L3 Information
|
|
||||||
L3_INFO_T L3_info_t , //!< Type of L3 Information
|
|
||||||
RB_ID DTCH_B_id , //!< RBID of broadcast IP service (MR only)
|
|
||||||
RB_ID DTCH_id //!< RBID of default IP service (MR only)
|
|
||||||
)
|
|
||||||
{
|
|
||||||
rrm_t *rrm = &rrm_inst[inst] ;
|
|
||||||
//fprintf(stderr,"[RRM] RRC_CX_ESTABLISH_IND (%d) :status=%d\n",Trans_id,rrm->state);
|
|
||||||
|
|
||||||
if ( (rrm->state == CLUSTERHEAD) ) {
|
|
||||||
//fprintf(stderr,"[RRM] RRC_CX_ESTABLISH_IND (%d) :status=CH %d\n",Trans_id,rrm->state);
|
|
||||||
PUT_CMM_MSG( msg_rrm_attach_ind(inst,L2_id,L3_info_t,L3_info, 0 )) ;
|
|
||||||
} else if ( rrm->state == MESHROUTER ) {
|
|
||||||
fprintf(stderr,"[RRM] RRC_CX_ESTABLISH_IND (%d) :status=MR %d\n",Trans_id,rrm->state);
|
|
||||||
pthread_mutex_lock( &( rrm->rrc.exclu ) ) ;
|
|
||||||
//fprintf(stderr,"item_trans in RRC_CX_ESTABLISH_IND=%d node %d\n",rrm->rrc.trans_cnt,rrm->id);//dbg
|
|
||||||
add_item_transact( &(rrm->rrc.transaction), Trans_id,INT_RRC,RRC_CX_ESTABLISH_IND,0,NO_PARENT);
|
|
||||||
pthread_mutex_unlock( &( rrm->rrc.exclu ) ) ;
|
|
||||||
|
|
||||||
pthread_mutex_lock( &( rrm->cmm.exclu ) ) ;
|
|
||||||
rrm->cmm.trans_cnt++ ;
|
|
||||||
//fprintf(stderr,"item_trans in RRCI_ATTACH_REQ=%d node %d\n",rrm->cmm.trans_cnt,rrm->id);//dbg
|
|
||||||
add_item_transact( &(rrm->cmm.transaction), rrm->cmm.trans_cnt,INT_CMM,RRCI_ATTACH_REQ,Trans_id,PARENT);
|
|
||||||
pthread_mutex_unlock( &( rrm->cmm.exclu ) ) ;
|
|
||||||
|
|
||||||
PUT_CMM_MSG( msg_rrci_attach_req(inst,L2_id,L3_info_t,L3_info, DTCH_B_id, DTCH_id ,rrm->cmm.trans_cnt)) ;
|
|
||||||
} else
|
|
||||||
fprintf(stderr,"[RRM] RRC_CX_ESTABLISH_IND (%d) is not allowed (Only CH):status=%d\n",Trans_id,rrm->state);
|
|
||||||
|
|
||||||
}
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief Clusterhead PHY-Synch Indication
|
|
||||||
*/
|
|
||||||
void rrc_phy_synch_to_CH_ind(
|
|
||||||
Instance_t inst , //!< Identification de l'instance
|
|
||||||
unsigned int Ch_index , //!< Clusterhead index
|
|
||||||
L2_ID L2_id
|
|
||||||
)
|
|
||||||
{
|
|
||||||
rrm_t *rrm = &rrm_inst[inst] ;
|
|
||||||
|
|
||||||
if ( (rrm->state == ISOLATEDNODE) || (rrm->state == MESHROUTER) ) {
|
|
||||||
rrm->state = MESHROUTER ;
|
|
||||||
|
|
||||||
/* Memorisation du L2_id du noeud ( c'est le niveau RRC qui a l'info ) */
|
|
||||||
memcpy( &rrm->L2_id, &L2_id, sizeof(L2_ID));
|
|
||||||
|
|
||||||
PUT_RRC_MSG(
|
|
||||||
msg_rrci_init_mr_req( inst,
|
|
||||||
rrm->rrc.trans_cnt,
|
|
||||||
&Lchan_desc[QOS_SRB0],
|
|
||||||
&Lchan_desc[QOS_SRB1],
|
|
||||||
Ch_index)
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
} else
|
|
||||||
fprintf(stderr,"[RRM] RRC_PHY_SYNCH_TO_CH_IND is not allowed (Only IN):etat=%d\n",rrm->state);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief L3 Connection Attachment confirmation. Message sent by CMM in MR at
|
|
||||||
completion of L3 attachment phase of a new MR Here L3_info contains
|
|
||||||
MR IPAddr.
|
|
||||||
*/
|
|
||||||
void cmm_attach_cnf(
|
|
||||||
Instance_t inst , //!< Identification de l'instance
|
|
||||||
L2_ID L2_id , //!< L2_id of CH ( Mesh Router can see 2 CH )
|
|
||||||
L3_INFO_T L3_info_t , //!< Type of L3 Information
|
|
||||||
unsigned char *L3_info , //!< L3 addressing Information
|
|
||||||
Transaction_t Trans_id //!< Transaction ID
|
|
||||||
)
|
|
||||||
{
|
|
||||||
rrm_t *rrm = &rrm_inst[inst] ;
|
|
||||||
|
|
||||||
if ( rrm->state == MESHROUTER ) {
|
|
||||||
transact_t *pTransact ;
|
|
||||||
|
|
||||||
pthread_mutex_lock( &( rrm->cmm.exclu ) ) ;
|
|
||||||
pTransact = get_item_transact(rrm->cmm.transaction,Trans_id ) ;
|
|
||||||
|
|
||||||
if ( pTransact == NULL ) {
|
|
||||||
fprintf(stderr,"[RRM] CMM_ATTACH_CNF (%d): unknown transaction\n",Trans_id);
|
|
||||||
pthread_mutex_unlock( &( rrm->cmm.exclu ) ) ;
|
|
||||||
} else {
|
|
||||||
unsigned int parent_id = pTransact->parent_id ;
|
|
||||||
unsigned int status_parent = pTransact->parent_status ;
|
|
||||||
|
|
||||||
del_item_transact( &(rrm->cmm.transaction),Trans_id ) ;
|
|
||||||
pthread_mutex_unlock( &( rrm->cmm.exclu ) ) ;
|
|
||||||
|
|
||||||
if ( status_parent ) {
|
|
||||||
transact_t *pTransactParent ;
|
|
||||||
|
|
||||||
pthread_mutex_lock( &( rrm->rrc.exclu ) ) ;
|
|
||||||
pTransactParent =get_item_transact(rrm->rrc.transaction,parent_id ) ;
|
|
||||||
|
|
||||||
if ( pTransactParent != NULL ) {
|
|
||||||
rrm->L3_info_t = L3_info_t; //mod_lor_10_01_25
|
|
||||||
memcpy (&(rrm->L3_info), L3_info, L3_info_t); //mod_lor_10_01_25
|
|
||||||
PUT_RRC_MSG( msg_rrci_cx_establish_resp(inst,pTransactParent->id,L2_id,L3_info,L3_info_t ));
|
|
||||||
del_item_transact( &(rrm->rrc.transaction),pTransactParent->id ) ;
|
|
||||||
} else // la transaction parent est inconnue, on ne fait rien
|
|
||||||
fprintf(stderr,"[RRM] CMM_ATTACH_CNF (%d) : the parent transaction (%d) is unknown\n",Trans_id,parent_id);
|
|
||||||
|
|
||||||
pthread_mutex_unlock( &( rrm->rrc.exclu ) ) ;
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else
|
|
||||||
fprintf(stderr,"[RRM] CMM_ATTACH_CNF (%d) is not allowed (Only MR):etat=%d\n",Trans_id,rrm->state);
|
|
||||||
}
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief RRC sensing measurement indication
|
|
||||||
*/
|
|
||||||
void rrc_sensing_meas_ind(
|
|
||||||
Instance_t inst , //!< Identification de l'instance
|
|
||||||
L2_ID L2_id , //!< Layer 2 ID (MAC) of sensing node
|
|
||||||
unsigned int NB_meas , //!< Number of measurements
|
|
||||||
SENSING_MEAS_T *Sensing_meas , //!< Sensing Information
|
|
||||||
Transaction_t Trans_id //!< Transaction ID
|
|
||||||
)
|
|
||||||
{
|
|
||||||
int i ;
|
|
||||||
|
|
||||||
rrm_t *rrm = &rrm_inst[inst] ;
|
|
||||||
|
|
||||||
if ( (rrm->state == CLUSTERHEAD) ) {
|
|
||||||
pthread_mutex_lock( &( rrm->rrc.exclu ) ) ;
|
|
||||||
|
|
||||||
// update database of neighbor
|
|
||||||
set_Sensing_meas_neighbor( rrm->rrc.pNeighborEntry, &L2_id , NB_meas, Sensing_meas );
|
|
||||||
|
|
||||||
pthread_mutex_unlock( &( rrm->rrc.exclu ) ) ;
|
|
||||||
// send the response to rrc
|
|
||||||
PUT_RRC_MSG( msg_rrm_sensing_meas_resp(inst,Trans_id) );
|
|
||||||
|
|
||||||
for ( i = 0 ; i< NB_meas ; i++) {
|
|
||||||
pthread_mutex_lock( &( rrm->pusu.exclu ) ) ;
|
|
||||||
rrm->pusu.trans_cnt++ ;
|
|
||||||
add_item_transact( &(rrm->pusu.transaction), rrm->pusu.trans_cnt,INT_PUSU,RRM_SENSING_INFO_IND,0,NO_PARENT);
|
|
||||||
pthread_mutex_unlock( &( rrm->pusu.exclu ) ) ;
|
|
||||||
|
|
||||||
PUT_PUSU_MSG( msg_rrm_sensing_info_ind(inst, L2_id,Sensing_meas[i].L2_id, Sensing_meas[i].Rssi, rrm->pusu.trans_cnt ) ) ;
|
|
||||||
}
|
|
||||||
|
|
||||||
} else
|
|
||||||
fprintf(stderr,"[RRM] RRC_SENSING_MEAS_IND is not allowed (Only CH):etat=%d\n",rrm->state);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -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 mr_attach.h
|
|
||||||
|
|
||||||
\brief Fichier d'entete contenant les declarations des types, des defines ,
|
|
||||||
et des fonctions relatives a la gestion de l'attachement d'un Mesh
|
|
||||||
Router a un cluster.
|
|
||||||
|
|
||||||
\author BURLOT Pascal
|
|
||||||
|
|
||||||
\date 29/08/08
|
|
||||||
|
|
||||||
|
|
||||||
\par Historique:
|
|
||||||
$Author$ $Date$ $Revision$
|
|
||||||
$Id$
|
|
||||||
$Log$
|
|
||||||
|
|
||||||
*******************************************************************************
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef MR_ATTACH_H
|
|
||||||
#define MR_ATTACH_H
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif /* MR_ATTACH_H */
|
|
||||||
@@ -1,206 +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 msg_mngt.c
|
|
||||||
|
|
||||||
\brief Gestion de l'envoi et la reception de message.
|
|
||||||
|
|
||||||
\author BURLOT Pascal
|
|
||||||
|
|
||||||
\date 17/07/08
|
|
||||||
|
|
||||||
\par Historique:
|
|
||||||
$Author$ $Date$ $Revision$
|
|
||||||
$Id$
|
|
||||||
$Log$
|
|
||||||
|
|
||||||
*******************************************************************************
|
|
||||||
*/
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <errno.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <unistd.h>
|
|
||||||
|
|
||||||
#include <sys/socket.h>
|
|
||||||
#include <sys/un.h>
|
|
||||||
|
|
||||||
#include <pthread.h>
|
|
||||||
|
|
||||||
#include "debug.h"
|
|
||||||
#include "L3_rrc_defs.h"
|
|
||||||
#include "rrm_util.h"
|
|
||||||
#include "rrm_sock.h"
|
|
||||||
#include "msg_mngt.h"
|
|
||||||
|
|
||||||
//! Selection locale du mode de debug
|
|
||||||
#define DBG_MSG_MNGT 0
|
|
||||||
|
|
||||||
#if DBG_MSG_MNGT==0
|
|
||||||
//! Macro inactive
|
|
||||||
#define PRINT_MSG_MNGT(...)
|
|
||||||
#else
|
|
||||||
//! Macro affichant la file de message
|
|
||||||
#define PRINT_MSG_MNGT(...) print_msg_mngt( __VA_ARGS__ )
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief La fonction affiche a l'ecran la liste des messages
|
|
||||||
|
|
||||||
\return aucune valeur retournee
|
|
||||||
*/
|
|
||||||
static void print_msg_mngt( file_msg_t *pEntry , int id )
|
|
||||||
{
|
|
||||||
file_msg_t *pCurrentItem = pEntry;
|
|
||||||
|
|
||||||
fprintf(stderr,"file_msg_t(%d)=[\n", id);
|
|
||||||
|
|
||||||
while ( pCurrentItem != NULL) {
|
|
||||||
fprintf(stderr," @%p(.s=%p, .msg=%p, .next=%p)\n", pCurrentItem, pCurrentItem->s,
|
|
||||||
pCurrentItem->msg, pCurrentItem->next);
|
|
||||||
pCurrentItem = pCurrentItem->next ;
|
|
||||||
}
|
|
||||||
|
|
||||||
fprintf(stderr," ]\n");
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief La fonction initialise la file des messages.
|
|
||||||
|
|
||||||
\return aucune valeur.
|
|
||||||
*/
|
|
||||||
void init_file_msg(
|
|
||||||
file_head_t *file_hd , ///< descripteur de la file des messages
|
|
||||||
int id ///< file id
|
|
||||||
)
|
|
||||||
{
|
|
||||||
pthread_mutex_init( &( file_hd->mutex ), NULL ) ;
|
|
||||||
|
|
||||||
file_hd->id = id;
|
|
||||||
file_hd->file = NULL ;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief La fonction ajoute un element en debut de la file des messages.
|
|
||||||
|
|
||||||
\return retourne le pointeur le nouvel element de la liste.
|
|
||||||
*/
|
|
||||||
file_msg_t *put_msg(
|
|
||||||
file_head_t *file_hd , ///< descripteur de la file des messages
|
|
||||||
//mod_lor_10_01_25
|
|
||||||
int s_type , ///< socket type: 0 -> unix; 1 -> internet
|
|
||||||
//sock_rrm_t *s, ///< socket associe au message
|
|
||||||
void *s , ///< socket associe au message
|
|
||||||
|
|
||||||
msg_t *msg ///< le message a ajouter dans la liste
|
|
||||||
)
|
|
||||||
{
|
|
||||||
file_msg_t *pOldEntry = file_hd->file;
|
|
||||||
|
|
||||||
file_msg_t *pNewItem = RRM_MALLOC( file_msg_t , 1 ) ;
|
|
||||||
|
|
||||||
if ( pNewItem == NULL )
|
|
||||||
return NULL ;
|
|
||||||
|
|
||||||
//fprintf(stderr,"put_msg 1 \n");//dbg
|
|
||||||
CALL(pthread_mutex_lock( &(file_hd->mutex) ));
|
|
||||||
|
|
||||||
file_hd->file = pNewItem ;
|
|
||||||
pNewItem->next = pOldEntry ;
|
|
||||||
//mod_lor_10_01_25++
|
|
||||||
pNewItem->s_type = s_type ;
|
|
||||||
|
|
||||||
//fprintf(stderr,"put_msg 2 \n");//dbg
|
|
||||||
if (s_type) {
|
|
||||||
pNewItem->s = NULL ;
|
|
||||||
pNewItem->s_int = s ;
|
|
||||||
} else {
|
|
||||||
pNewItem->s = s ;
|
|
||||||
pNewItem->s_int = NULL ;
|
|
||||||
}
|
|
||||||
|
|
||||||
//mod_lor_10_01_25--
|
|
||||||
pNewItem->msg = msg ;
|
|
||||||
|
|
||||||
//fprintf(stderr,"put_msg 3 \n");//dbg
|
|
||||||
PRINT_MSG_MNGT( file_hd->file , file_hd->id );
|
|
||||||
|
|
||||||
//fprintf(stderr,"put_msg 4 \n");//dbg
|
|
||||||
CALL(pthread_mutex_unlock( &(file_hd->mutex) ));
|
|
||||||
|
|
||||||
//fprintf(stderr,"put_msg end \n");//dbg
|
|
||||||
return pNewItem ;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief La fonction retire le dernier element de la file des messages.
|
|
||||||
|
|
||||||
\return retourne le pointeur sur l'element enleve de la liste.
|
|
||||||
*/
|
|
||||||
file_msg_t *get_msg(
|
|
||||||
file_head_t *file_hd ///< descripteur de la file des messages
|
|
||||||
)
|
|
||||||
{
|
|
||||||
file_msg_t *pCurrentItem = file_hd->file ;
|
|
||||||
file_msg_t *pNextItem ;
|
|
||||||
file_msg_t **ppPrevItem = &(file_hd->file) ;
|
|
||||||
|
|
||||||
if ( (pCurrentItem == NULL) )
|
|
||||||
return NULL ;
|
|
||||||
|
|
||||||
CALL(pthread_mutex_lock( &(file_hd->mutex) ));
|
|
||||||
|
|
||||||
while ( pCurrentItem != NULL ) {
|
|
||||||
|
|
||||||
pNextItem = pCurrentItem->next ;
|
|
||||||
|
|
||||||
if ( pNextItem == NULL ) {
|
|
||||||
/* Dernier element */
|
|
||||||
*ppPrevItem = NULL ;
|
|
||||||
break ;
|
|
||||||
}
|
|
||||||
|
|
||||||
ppPrevItem = &(pCurrentItem->next) ;
|
|
||||||
pCurrentItem = pNextItem ;
|
|
||||||
}
|
|
||||||
|
|
||||||
PRINT_MSG_MNGT( file_hd->file , file_hd->id );
|
|
||||||
PRINT_MSG_MNGT( pCurrentItem , file_hd->id *-1 );
|
|
||||||
|
|
||||||
CALL(pthread_mutex_unlock( &(file_hd->mutex) ));
|
|
||||||
return pCurrentItem ;
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -1,93 +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 msg_mngt.h
|
|
||||||
|
|
||||||
\brief Fichier d'entete contenant les declarations des types, des defines ,
|
|
||||||
et des fonctions relatives a la gestion de l'envoi et la reception
|
|
||||||
de message.
|
|
||||||
|
|
||||||
\author BURLOT Pascal
|
|
||||||
|
|
||||||
\date 17/07/08
|
|
||||||
|
|
||||||
\par Historique:
|
|
||||||
$Author$ $Date$ $Revision$
|
|
||||||
$Id$
|
|
||||||
$Log$
|
|
||||||
|
|
||||||
*******************************************************************************
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef MSG_MNGT_H
|
|
||||||
#define MSG_MNGT_H
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief File des messages reçus ou a envoyer
|
|
||||||
*/
|
|
||||||
typedef struct msg_file_s {
|
|
||||||
//mod_lor_10_01_25
|
|
||||||
int s_type ; /// socket type: 0 -> unix; 1 -> internet
|
|
||||||
sock_rrm_t *s ; ///< socket origine ou destinataire si unix
|
|
||||||
sock_rrm_int_t *s_int ; ///< socket origine ou destinataire si internet
|
|
||||||
|
|
||||||
msg_t *msg ; ///< data of message
|
|
||||||
struct msg_file_s *next ; ///< next message of file
|
|
||||||
} file_msg_t ;
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief Entete de la file des messages reçus ou a envoyer
|
|
||||||
*/
|
|
||||||
typedef struct {
|
|
||||||
int id ; ///< id
|
|
||||||
pthread_mutex_t mutex ; ///< Mutex associee
|
|
||||||
file_msg_t *file ; ///< point d'entree sur la file des messages
|
|
||||||
} file_head_t ;
|
|
||||||
|
|
||||||
/*
|
|
||||||
*******************************************************************************
|
|
||||||
*/
|
|
||||||
void init_file_msg( file_head_t *file_hd , int id ) ;
|
|
||||||
file_msg_t *put_msg( file_head_t *file_hd , int s_type, void *s, msg_t *msg) ; //mod_lor_10_01_25
|
|
||||||
file_msg_t *get_msg( file_head_t *file_hd ) ;
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif /* MSG_MNGT_H */
|
|
||||||
@@ -1,485 +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 neighbor_db.c
|
|
||||||
|
|
||||||
\brief Fonctions permettant la gestion de la base de donnée sur le voisinage
|
|
||||||
directe (1 saut) du cluster head et indirecte a 2 sauts.
|
|
||||||
|
|
||||||
\author BURLOT Pascal
|
|
||||||
|
|
||||||
\date 29/08/08
|
|
||||||
|
|
||||||
|
|
||||||
\par Historique:
|
|
||||||
$Author$ $Date$ $Revision$
|
|
||||||
$Id$
|
|
||||||
$Log$
|
|
||||||
|
|
||||||
*******************************************************************************
|
|
||||||
*/
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <errno.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <unistd.h>
|
|
||||||
|
|
||||||
#include <sys/socket.h>
|
|
||||||
#include <sys/un.h>
|
|
||||||
|
|
||||||
#include <pthread.h>
|
|
||||||
|
|
||||||
#include "debug.h"
|
|
||||||
#include "L3_rrc_defs.h"
|
|
||||||
#include "rrm_sock.h"
|
|
||||||
#include "rrc_rrm_msg.h"
|
|
||||||
#include "rrm_util.h"
|
|
||||||
#include "neighbor_db.h"
|
|
||||||
|
|
||||||
//! Selection locale du mode de debug
|
|
||||||
#define DBG_NEIGHBOR_DB 0
|
|
||||||
|
|
||||||
#if DBG_NEIGHBOR_DB==0
|
|
||||||
//! Macro inactive
|
|
||||||
#define PRINT_NEIGHBOR_DB(...)
|
|
||||||
#else
|
|
||||||
//! Macro affichant la liste du voisnage d'un cluster
|
|
||||||
#define PRINT_NEIGHBOR_DB(...) print_neighbor_db( __VA_ARGS__ )
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief Comparaison de deux ID de niveau 2
|
|
||||||
|
|
||||||
\return si 0 alors les IDs sont identiques
|
|
||||||
*/
|
|
||||||
static int L2_ID_cmp(
|
|
||||||
L2_ID *L2_id1, ///< ID de niveau 2
|
|
||||||
L2_ID *L2_id2 ///< ID de niveau 2
|
|
||||||
)
|
|
||||||
{
|
|
||||||
return memcmp( L2_id1, L2_id2, sizeof(L2_ID) ) ;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief La fonction affiche a l'ecran la liste (pour DEBUG )
|
|
||||||
|
|
||||||
\return aucune valeur retournee
|
|
||||||
*/
|
|
||||||
static void print_neighbor_db(
|
|
||||||
neighbor_desc_t *pEntry ///< pointeur sur le debut de liste
|
|
||||||
)
|
|
||||||
{
|
|
||||||
unsigned int i , j ;
|
|
||||||
neighbor_desc_t *pCurrentItem = pEntry;
|
|
||||||
|
|
||||||
fprintf(stderr,"neighbor list=[\n");
|
|
||||||
|
|
||||||
while ( pCurrentItem != NULL) {
|
|
||||||
fprintf(stderr," @%p(.L2_id=", pCurrentItem );
|
|
||||||
|
|
||||||
for ( i=0; i<8; i++)
|
|
||||||
fprintf(stderr,"%02X", pCurrentItem->L2_id.L2_id[i]);
|
|
||||||
|
|
||||||
fprintf(stderr,", .NB_neighbor=%u, .Sensing_meas=%p, .next=%p)\n",
|
|
||||||
pCurrentItem->NB_neighbor, pCurrentItem->Sensing_meas,pCurrentItem->next );
|
|
||||||
|
|
||||||
if ( pCurrentItem->Sensing_meas != NULL )
|
|
||||||
for ( j=0; j<pCurrentItem->NB_neighbor; j++) {
|
|
||||||
fprintf(stderr,"\tNeighbor(%d):.L2_id=",j);
|
|
||||||
|
|
||||||
for ( i=0; i<8; i++)
|
|
||||||
fprintf(stderr,"%02X", pCurrentItem->Sensing_meas[j].L2_id.L2_id[i]);
|
|
||||||
|
|
||||||
fprintf(stderr," .RSSI=%02X\n", pCurrentItem->Sensing_meas[j].Rssi);
|
|
||||||
}
|
|
||||||
|
|
||||||
pCurrentItem = pCurrentItem->next ;
|
|
||||||
}
|
|
||||||
|
|
||||||
fprintf(stderr," ]\n");
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief La fonction ajoute un voisin dans la liste des voisins du Cluster head.
|
|
||||||
|
|
||||||
\return retourne la valeur du nouvel element
|
|
||||||
*/
|
|
||||||
neighbor_desc_t *add_neighbor(
|
|
||||||
neighbor_desc_t **neighbor_entry, ///< pointeur sur l'entree de la liste de voisinage
|
|
||||||
L2_ID *L2_id ///< ID du nouveau noeud
|
|
||||||
)
|
|
||||||
{
|
|
||||||
neighbor_desc_t *pNewItem = get_neighbor( *neighbor_entry, L2_id );
|
|
||||||
|
|
||||||
if ( pNewItem == NULL ) {
|
|
||||||
// If not Exist then create a new item
|
|
||||||
neighbor_desc_t *pOldEntry = *neighbor_entry;
|
|
||||||
|
|
||||||
pNewItem = RRM_MALLOC(neighbor_desc_t , 1 ) ;
|
|
||||||
|
|
||||||
PNULL(pNewItem) ;
|
|
||||||
|
|
||||||
if ( pNewItem == NULL )
|
|
||||||
return NULL ;
|
|
||||||
|
|
||||||
memcpy( pNewItem->L2_id.L2_id , L2_id->L2_id, sizeof(L2_ID) ) ;
|
|
||||||
//pNewItem->RSSI = 0 ;
|
|
||||||
pNewItem->NB_neighbor = 0 ;
|
|
||||||
pNewItem->Sensing_meas= NULL;
|
|
||||||
|
|
||||||
*neighbor_entry = pNewItem ;
|
|
||||||
pNewItem->next = pOldEntry;
|
|
||||||
}
|
|
||||||
|
|
||||||
PRINT_NEIGHBOR_DB( *neighbor_entry );
|
|
||||||
return pNewItem ;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief La fonction retire un element de la liste des voisins
|
|
||||||
|
|
||||||
\return aucune valeur.
|
|
||||||
*/
|
|
||||||
void del_neighbor(
|
|
||||||
neighbor_desc_t **neighbor_entry, ///< pointeur sur l'entree de la liste de voisinage
|
|
||||||
L2_ID *L2_id ///< ID niveau 2 du voisin a detruire
|
|
||||||
)
|
|
||||||
{
|
|
||||||
neighbor_desc_t *pCurrentItem = *neighbor_entry;
|
|
||||||
neighbor_desc_t *pNextItem ;
|
|
||||||
neighbor_desc_t **ppPrevItem = neighbor_entry ;
|
|
||||||
|
|
||||||
if ( (pCurrentItem == NULL) || (neighbor_entry==NULL))
|
|
||||||
return ;
|
|
||||||
|
|
||||||
while ( pCurrentItem != NULL ) {
|
|
||||||
pNextItem = pCurrentItem->next ;
|
|
||||||
|
|
||||||
if ( L2_ID_cmp( &(pCurrentItem->L2_id),L2_id) == 0 ) {
|
|
||||||
*ppPrevItem = pNextItem;
|
|
||||||
|
|
||||||
RRM_FREE( pCurrentItem->Sensing_meas) ;
|
|
||||||
RRM_FREE( pCurrentItem ) ;
|
|
||||||
break ;
|
|
||||||
}
|
|
||||||
|
|
||||||
ppPrevItem = &(pCurrentItem->next) ;
|
|
||||||
pCurrentItem = pNextItem ;
|
|
||||||
}
|
|
||||||
|
|
||||||
PRINT_NEIGHBOR_DB( *neighbor_entry );
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief La fonction detruit entierement la liste des voisins
|
|
||||||
|
|
||||||
\return aucune valeur.
|
|
||||||
*/
|
|
||||||
void del_all_neighbor(
|
|
||||||
neighbor_desc_t **neighbor_entry ///< pointeur sur l'entree de la liste de voisinage
|
|
||||||
)
|
|
||||||
{
|
|
||||||
neighbor_desc_t *pCurrentItem = *neighbor_entry;
|
|
||||||
neighbor_desc_t *pNextItem ;
|
|
||||||
|
|
||||||
if ( (pCurrentItem == NULL) || (neighbor_entry==NULL))
|
|
||||||
return ;
|
|
||||||
|
|
||||||
while ( pCurrentItem != NULL ) {
|
|
||||||
pNextItem = pCurrentItem->next ;
|
|
||||||
|
|
||||||
RRM_FREE( pCurrentItem->Sensing_meas ) ;
|
|
||||||
RRM_FREE( pCurrentItem ) ;
|
|
||||||
|
|
||||||
pCurrentItem = pNextItem ;
|
|
||||||
}
|
|
||||||
|
|
||||||
*neighbor_entry = NULL ;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief La fonction recherche les informations de voisinage d'un noeud
|
|
||||||
|
|
||||||
\return descripteur sur les infos de voisinage du noeud ou NULL
|
|
||||||
*/
|
|
||||||
neighbor_desc_t *get_neighbor(
|
|
||||||
neighbor_desc_t *neighbor_entry, ///< pointeur sur l'entree de la liste de voisinage
|
|
||||||
L2_ID *L2_id ///< ID du noeud
|
|
||||||
)
|
|
||||||
{
|
|
||||||
neighbor_desc_t *pCurrentItem = neighbor_entry;
|
|
||||||
|
|
||||||
while ( pCurrentItem != NULL) {
|
|
||||||
if ( L2_ID_cmp( &(pCurrentItem->L2_id),L2_id) == 0 )
|
|
||||||
break ;
|
|
||||||
|
|
||||||
pCurrentItem = pCurrentItem->next ;
|
|
||||||
}
|
|
||||||
|
|
||||||
return pCurrentItem ;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief La fonction met a jour les informations de mesure de voisinage d'un noeud
|
|
||||||
|
|
||||||
\return aucune valeur
|
|
||||||
*/
|
|
||||||
void set_Sensing_meas_neighbor(
|
|
||||||
neighbor_desc_t *neighbor_entry, ///< pointeur sur l'entree de la liste de voisinage
|
|
||||||
L2_ID *L2_id , ///< ID du noeud
|
|
||||||
unsigned int nb_meas , ///< Nombre de mesure associe au noeud
|
|
||||||
SENSING_MEAS_T *sensing_meas ///< Mesures de voisinage
|
|
||||||
)
|
|
||||||
{
|
|
||||||
neighbor_desc_t *pCurrentItem = neighbor_entry;
|
|
||||||
|
|
||||||
while ( pCurrentItem != NULL) {
|
|
||||||
if ( L2_ID_cmp( &(pCurrentItem->L2_id),L2_id) == 0 ) {
|
|
||||||
pCurrentItem->NB_neighbor = 0 ;
|
|
||||||
|
|
||||||
RRM_FREE(pCurrentItem->Sensing_meas );
|
|
||||||
|
|
||||||
if ( nb_meas > 0 ) {
|
|
||||||
SENSING_MEAS_T *p = RRM_MALLOC(SENSING_MEAS_T, nb_meas ) ;
|
|
||||||
|
|
||||||
if ( p != NULL ) {
|
|
||||||
int size = nb_meas * sizeof(SENSING_MEAS_T) ;
|
|
||||||
memcpy( p,sensing_meas , size );
|
|
||||||
pCurrentItem->NB_neighbor = nb_meas ;
|
|
||||||
pCurrentItem->Sensing_meas = p ;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
break ;
|
|
||||||
}
|
|
||||||
|
|
||||||
pCurrentItem = pCurrentItem->next ;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (pCurrentItem==NULL) {
|
|
||||||
fprintf(stderr,"ERROR: Unknown MR L2_id :");
|
|
||||||
print_L2_id(L2_id) ;
|
|
||||||
fprintf(stderr,"\n");
|
|
||||||
}
|
|
||||||
|
|
||||||
PRINT_NEIGHBOR_DB( neighbor_entry );
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief La fonction lit l'information de RSSI entre un noeud et un noeud voisin
|
|
||||||
|
|
||||||
\return la valeur de RSSI
|
|
||||||
*/
|
|
||||||
unsigned char get_RSSI_neighbor(
|
|
||||||
neighbor_desc_t *neighbor_entry , ///< pointeur sur l'entree de la liste de voisinage
|
|
||||||
L2_ID *L2_id , ///< ID du noeud
|
|
||||||
L2_ID *neighbor_id ///< ID du noeud voisin
|
|
||||||
)
|
|
||||||
{
|
|
||||||
neighbor_desc_t *pCurrentItem = neighbor_entry;
|
|
||||||
unsigned char rssi = 0xFF ;
|
|
||||||
int i ;
|
|
||||||
|
|
||||||
while ( pCurrentItem != NULL) {
|
|
||||||
if ( L2_ID_cmp( &(pCurrentItem->L2_id),L2_id) == 0 ) {
|
|
||||||
for ( i = 0 ; i < pCurrentItem->NB_neighbor ; i++ ) {
|
|
||||||
if ( L2_ID_cmp( &(pCurrentItem->Sensing_meas[i].L2_id),neighbor_id) == 0 ) {
|
|
||||||
rssi = pCurrentItem->Sensing_meas[i].Rssi ;
|
|
||||||
return (rssi) ;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
pCurrentItem = pCurrentItem->next ;
|
|
||||||
}
|
|
||||||
|
|
||||||
return rssi ;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief La fonction ajoute un couple de voisin a la liste de type neighbor_list_t
|
|
||||||
|
|
||||||
\return le nouvel element de liste
|
|
||||||
*/
|
|
||||||
static neighbor_list_t *add_item_neighbor_list(
|
|
||||||
neighbor_list_t **neighbor_list_entry , ///< pointeur sur l'entree de la liste des couples de voisins
|
|
||||||
L2_ID *L2_id1 , ///< ID du noeud 1
|
|
||||||
L2_ID *L2_id2 ///< ID du noeud 2
|
|
||||||
)
|
|
||||||
{
|
|
||||||
neighbor_list_t *pOldEntry = *neighbor_list_entry;
|
|
||||||
|
|
||||||
neighbor_list_t *pNewItem = RRM_MALLOC(neighbor_list_t, 1 ) ;
|
|
||||||
|
|
||||||
PNULL(pNewItem) ;
|
|
||||||
|
|
||||||
if ( pNewItem == NULL )
|
|
||||||
return NULL ;
|
|
||||||
|
|
||||||
memcpy( &(pNewItem->L2_id[0]) , L2_id1, sizeof(L2_ID) ) ;
|
|
||||||
memcpy( &(pNewItem->L2_id[1]) , L2_id2, sizeof(L2_ID) ) ;
|
|
||||||
pNewItem->Rssi[0] = 0xFF ;
|
|
||||||
pNewItem->Rssi[1] = 0xFF ;
|
|
||||||
pNewItem->nb_opened_rb = 0 ;
|
|
||||||
pNewItem->rb_meas = NULL;
|
|
||||||
|
|
||||||
*neighbor_list_entry = pNewItem ;
|
|
||||||
pNewItem->next = pOldEntry;
|
|
||||||
|
|
||||||
return pNewItem ;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief La fonction touve un couple de voisin dans la liste de type neighbor_list_t
|
|
||||||
|
|
||||||
\return l'element trouve
|
|
||||||
*/
|
|
||||||
static neighbor_list_t *get_item_neighbor_list(
|
|
||||||
neighbor_list_t *neighbor_list_entry, ///< pointeur sur l'entree de la liste des couples de voisins
|
|
||||||
L2_ID *L2_id1 , ///< ID du noeud 1
|
|
||||||
L2_ID *L2_id2 ///< ID du noeud 2
|
|
||||||
)
|
|
||||||
{
|
|
||||||
neighbor_list_t *pCurrentItem = neighbor_list_entry;
|
|
||||||
L2_ID L2_id[2] ;
|
|
||||||
|
|
||||||
memcpy( &(L2_id[0]), L2_id1, sizeof(L2_ID) ) ;
|
|
||||||
memcpy( &(L2_id[1]), L2_id2, sizeof(L2_ID) ) ;
|
|
||||||
|
|
||||||
while ( pCurrentItem != NULL) {
|
|
||||||
if ( memcmp( &(pCurrentItem->L2_id),L2_id,2*sizeof(L2_ID)) == 0 )
|
|
||||||
break ;
|
|
||||||
|
|
||||||
pCurrentItem = pCurrentItem->next ;
|
|
||||||
}
|
|
||||||
|
|
||||||
return pCurrentItem ;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief La fonction cree la liste de type neighbor_list_t a partie d'une liste
|
|
||||||
de type neighbor_desc_t:
|
|
||||||
- Elle construit la liste des MR en vue directe du CH (voisinage directe)
|
|
||||||
- Elle construit la liste des MR voyant d'autre MR (voisinage a 2 sauts)
|
|
||||||
|
|
||||||
\return retourne la liste de type neighbor_list_t.
|
|
||||||
*/
|
|
||||||
neighbor_list_t *create_neighbor_list(
|
|
||||||
neighbor_desc_t *neighbor_entry , ///< pointeur sur l'entree de la liste de voisinage
|
|
||||||
L2_ID *L2_id_CH ///< ID du Cluster Head
|
|
||||||
)
|
|
||||||
{
|
|
||||||
neighbor_desc_t *pCurrentItem = neighbor_entry;
|
|
||||||
neighbor_list_t *pList=NULL ;
|
|
||||||
|
|
||||||
// construit la liste des MR voyant le CH en directe (voisinage directe)
|
|
||||||
while ( pCurrentItem != NULL) {
|
|
||||||
add_item_neighbor_list( &pList, L2_id_CH, &(pCurrentItem->L2_id) ) ;
|
|
||||||
pCurrentItem = pCurrentItem->next ;
|
|
||||||
}
|
|
||||||
|
|
||||||
// construit la liste des MR voyant d'autre MR (voisinage a 2 sauts)
|
|
||||||
pCurrentItem = neighbor_entry;
|
|
||||||
|
|
||||||
while ( pCurrentItem != NULL) {
|
|
||||||
int i ;
|
|
||||||
|
|
||||||
for ( i = 0 ; i<pCurrentItem->NB_neighbor; i++ ) {
|
|
||||||
neighbor_list_t *pItemFound ;
|
|
||||||
// Recherche du couple de voisin dans la liste
|
|
||||||
pItemFound = get_item_neighbor_list(pList ,
|
|
||||||
&(pCurrentItem->L2_id) ,
|
|
||||||
&(pCurrentItem->Sensing_meas[i].L2_id)
|
|
||||||
);
|
|
||||||
|
|
||||||
if ( pItemFound == NULL ) {
|
|
||||||
// si le couple n'est pas trouve alors on inverse les adresses MAC
|
|
||||||
pItemFound = get_item_neighbor_list(pList ,
|
|
||||||
&(pCurrentItem->Sensing_meas[i].L2_id) ,
|
|
||||||
&(pCurrentItem->L2_id)
|
|
||||||
);
|
|
||||||
|
|
||||||
if ( pItemFound == NULL ) {
|
|
||||||
// si ce couple n'est pas dans la liste alors on l'y ajoute
|
|
||||||
pItemFound = add_item_neighbor_list( &pList, &(pCurrentItem->L2_id), &(pCurrentItem->Sensing_meas[i].L2_id)) ;
|
|
||||||
pItemFound->Rssi[1] = pCurrentItem->Sensing_meas[i].Rssi ;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
// Met a jour le champs Rssi
|
|
||||||
pItemFound->Rssi[0] = pCurrentItem->Sensing_meas[i].Rssi ;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
pCurrentItem = pCurrentItem->next ;
|
|
||||||
}
|
|
||||||
|
|
||||||
return pList ;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief La fonction detruit la liste de type neighbor_list_t .
|
|
||||||
|
|
||||||
\return Aucune valeur
|
|
||||||
*/
|
|
||||||
void del_neighbor_list(
|
|
||||||
neighbor_list_t **neighbor_list_entry ///< pointeur sur l'entree de la liste de voisinage
|
|
||||||
)
|
|
||||||
{
|
|
||||||
neighbor_list_t *pCurrentItem = *neighbor_list_entry;
|
|
||||||
neighbor_list_t *pNextItem ;
|
|
||||||
|
|
||||||
if ( (pCurrentItem == NULL) || (neighbor_list_entry==NULL))
|
|
||||||
return ;
|
|
||||||
|
|
||||||
while ( pCurrentItem != NULL ) {
|
|
||||||
pNextItem = pCurrentItem->next ;
|
|
||||||
|
|
||||||
RRM_FREE( pCurrentItem->rb_meas ) ;
|
|
||||||
RRM_FREE( pCurrentItem ) ;
|
|
||||||
|
|
||||||
pCurrentItem = pNextItem ;
|
|
||||||
}
|
|
||||||
|
|
||||||
*neighbor_list_entry = NULL ;
|
|
||||||
}
|
|
||||||
@@ -1,112 +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 neighbor_db.h
|
|
||||||
|
|
||||||
\brief Fichier d'entete contenant les declarations des types, des defines ,
|
|
||||||
et des fonctions relatives a la gestion de la base de donnée sur le
|
|
||||||
voisinage directe (1 saut) du cluster head et indirecte a 2 sauts.
|
|
||||||
|
|
||||||
\author BURLOT Pascal
|
|
||||||
|
|
||||||
\date 29/08/08
|
|
||||||
|
|
||||||
|
|
||||||
\par Historique:
|
|
||||||
$Author$ $Date$ $Revision$
|
|
||||||
$Id$
|
|
||||||
$Log$
|
|
||||||
|
|
||||||
*******************************************************************************
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef NEIGHBOR_DB_H
|
|
||||||
#define NEIGHBOR_DB_H
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief Description de la structure de voisinage d'un noeud attache a un cluster
|
|
||||||
*/
|
|
||||||
typedef struct neighbor_desc_s {
|
|
||||||
L2_ID L2_id ; /*!< L2_id of a node */
|
|
||||||
// Note: suppression du champ RSSI a ce niveau car le RSSI CH-MR n'est
|
|
||||||
// a priori pas mesuré , seul le RSSI des mesures de voisinage ou le RSSI
|
|
||||||
// sur les canaux logiques (RB) logiques
|
|
||||||
//unsigned char RSSI ; /*!< RSSI (minus in dBm) with the CH */
|
|
||||||
|
|
||||||
unsigned int NB_neighbor ; /*!< Number de neighbor (2hops) */
|
|
||||||
SENSING_MEAS_T *Sensing_meas ; /*!< RSSI measurement information
|
|
||||||
and list of neighbor L2_id */
|
|
||||||
struct neighbor_desc_s *next ; /*!< Next neighbor to 1 hop */
|
|
||||||
} neighbor_desc_t ;
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief Description de la liste de voisinage par couple de voisin
|
|
||||||
*/
|
|
||||||
typedef struct neighbor_list_s {
|
|
||||||
L2_ID L2_id[2] ; /*!< L2_id of a neighbor couple */
|
|
||||||
unsigned char Rssi[2] ; /*!< Rssi of each neighbor */
|
|
||||||
unsigned int nb_opened_rb ; /*!< Number of opened RBs */
|
|
||||||
rrc_rb_meas_ind_t *rb_meas ; /*!< Measure of opened RBs */
|
|
||||||
struct neighbor_list_s *next ; /*!< Next item */
|
|
||||||
} neighbor_list_t ;
|
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
|
||||||
|
|
||||||
neighbor_desc_t *add_neighbor( neighbor_desc_t **neighbor_entry, L2_ID *L2_id ) ;
|
|
||||||
void del_neighbor( neighbor_desc_t **neighbor_entry, L2_ID *L2_id ) ;
|
|
||||||
void del_all_neighbor( neighbor_desc_t **neighbor_entry ) ;
|
|
||||||
neighbor_desc_t *get_neighbor( neighbor_desc_t *neighbor_entry, L2_ID *L2_id ) ;
|
|
||||||
|
|
||||||
void set_Sensing_meas_neighbor( neighbor_desc_t *neighbor_entry, L2_ID *L2_id ,
|
|
||||||
unsigned int nb_meas, SENSING_MEAS_T *sensing_meas ) ;
|
|
||||||
|
|
||||||
|
|
||||||
unsigned char get_RSSI_neighbor(neighbor_desc_t *neighbor_entry,L2_ID *L2_id, L2_ID *neighbor_id );
|
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
|
||||||
/* NOT USED
|
|
||||||
neighbor_list_t *create_neighbor_list( neighbor_desc_t *neighbor_entry, L2_ID *L2_id_CH );
|
|
||||||
void del_neighbor_list( neighbor_list_t **neighbor_list_entry );
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif /* NEIGHBOR_DB_H */
|
|
||||||
@@ -1,285 +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 pusu_msg.c
|
|
||||||
|
|
||||||
\brief Fonctions permettant le formattage des donnees pour l'envoi d'un
|
|
||||||
message sur le socket entre le RRM et PuSu (intra/inter Routing)
|
|
||||||
|
|
||||||
\author BURLOT Pascal
|
|
||||||
|
|
||||||
\date 29/08/08
|
|
||||||
|
|
||||||
|
|
||||||
\par Historique:
|
|
||||||
$Author$ $Date$ $Revision$
|
|
||||||
$Id$
|
|
||||||
$Log$
|
|
||||||
|
|
||||||
*******************************************************************************
|
|
||||||
*/
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <errno.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <unistd.h>
|
|
||||||
|
|
||||||
#include <sys/socket.h>
|
|
||||||
#include <sys/un.h>
|
|
||||||
|
|
||||||
#include <pthread.h>
|
|
||||||
|
|
||||||
#include "L3_rrc_defs.h"
|
|
||||||
#include "rrm_sock.h"
|
|
||||||
#include "cmm_rrm_interface.h"
|
|
||||||
#include "pusu_msg.h"
|
|
||||||
#include "rrm_util.h"
|
|
||||||
|
|
||||||
#ifdef TRACE
|
|
||||||
//! Macro creant la chaine a partir du nom de la variable
|
|
||||||
#define STRINGIZER(x) #x
|
|
||||||
//! Tableau pour le mode trace faisant la translation entre le numero et le nom du message
|
|
||||||
const char *Str_msg_pusu_rrm[NB_MSG_RRM_PUSU] = {
|
|
||||||
STRINGIZER(RRM_PUBLISH_IND ) ,
|
|
||||||
STRINGIZER(PUSU_PUBLISH_RESP ) ,
|
|
||||||
STRINGIZER(RRM_UNPUBLISH_IND ) ,
|
|
||||||
STRINGIZER(PUSU_UNPUBLISH_RESP ) ,
|
|
||||||
STRINGIZER(RRM_LINK_INFO_IND ) ,
|
|
||||||
STRINGIZER(PUSU_LINK_INFO_RESP ) ,
|
|
||||||
STRINGIZER(RRM_SENSING_INFO_IND ) ,
|
|
||||||
STRINGIZER(PUSU_SENSING_NFO_RESP) ,
|
|
||||||
STRINGIZER(RRM_CH_LOAD_IND ) ,
|
|
||||||
STRINGIZER(PUSU_CH_LOAD_RESP )
|
|
||||||
};
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief This function initialize the message header
|
|
||||||
\return any return value
|
|
||||||
*/
|
|
||||||
static void init_pusu_msg_head(
|
|
||||||
msg_head_t *msg_head , ///< message header to initialize
|
|
||||||
Instance_t inst , ///< Instance associated to this message
|
|
||||||
MSG_RRM_PUSU_T msg_type , ///< type of message to initialize
|
|
||||||
unsigned int size , ///< size of message
|
|
||||||
Transaction_t Trans_id ///< transaction id associated to this message
|
|
||||||
)
|
|
||||||
{
|
|
||||||
if ( msg_head != NULL ) {
|
|
||||||
msg_head->start = START_MSG ;
|
|
||||||
msg_head->msg_type = 0xFF & msg_type ;
|
|
||||||
msg_head->inst = inst ;
|
|
||||||
msg_head->Trans_id = Trans_id ;
|
|
||||||
msg_head->size = size ;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief La fonction formate en un message d'annonce de nouveau service
|
|
||||||
envoyer sur le socket du PUSU.
|
|
||||||
\return message formate
|
|
||||||
*/
|
|
||||||
msg_t *msg_rrm_publish_ind(
|
|
||||||
Instance_t inst , ///< Instance associated to this message
|
|
||||||
int service , ///< service type
|
|
||||||
Transaction_t Trans_id ///< transaction id associated to this message
|
|
||||||
)
|
|
||||||
{
|
|
||||||
msg_t *msg = RRM_CALLOC(msg_t , 1 ) ;
|
|
||||||
|
|
||||||
if ( msg != NULL ) {
|
|
||||||
pusu_publish_t *p = RRM_CALLOC(pusu_publish_t , 1 );
|
|
||||||
|
|
||||||
if ( p != NULL ) {
|
|
||||||
init_pusu_msg_head(&msg->head, inst, RRM_PUBLISH_IND, sizeof(pusu_publish_t),Trans_id);
|
|
||||||
|
|
||||||
p->service_type = service ;
|
|
||||||
}
|
|
||||||
|
|
||||||
msg->data = (char *) p ;
|
|
||||||
}
|
|
||||||
|
|
||||||
return msg ;
|
|
||||||
}
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief La fonction formate en un message de retrait d'un service
|
|
||||||
envoyer sur le socket du PUSU.
|
|
||||||
\return message formate
|
|
||||||
*/
|
|
||||||
msg_t *msg_rrm_unpublish_ind(
|
|
||||||
Instance_t inst , ///< Instance associated to this message
|
|
||||||
int service , ///< type de service a retirer
|
|
||||||
Transaction_t Trans_id ///< transaction id associated to this message
|
|
||||||
)
|
|
||||||
{
|
|
||||||
msg_t *msg = RRM_CALLOC(msg_t , 1 ) ;
|
|
||||||
|
|
||||||
if ( msg != NULL ) {
|
|
||||||
pusu_publish_t *p = RRM_CALLOC(pusu_publish_t , 1 );
|
|
||||||
|
|
||||||
if ( p != NULL ) {
|
|
||||||
init_pusu_msg_head(&msg->head, inst, RRM_UNPUBLISH_IND, sizeof(pusu_unpublish_t),Trans_id);
|
|
||||||
|
|
||||||
p->service_type = service ;
|
|
||||||
}
|
|
||||||
|
|
||||||
msg->data = (char *) p ;
|
|
||||||
}
|
|
||||||
|
|
||||||
return msg ;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief La fonction formate en un message de mesure a envoyer sur le socket du PUSU.
|
|
||||||
\return message formate
|
|
||||||
*/
|
|
||||||
msg_t *msg_rrm_link_info_ind(
|
|
||||||
Instance_t inst , ///< Instance associated to this message
|
|
||||||
L2_ID noeud1 , ///< L2_ID du noeud 1
|
|
||||||
L2_ID noeud2 , ///< L2_ID du noeud 2
|
|
||||||
RB_ID rb_id , ///< identtification du lien RB
|
|
||||||
unsigned char rssi , ///< RSSI du noeud2 mesure par le noeud1
|
|
||||||
unsigned char spec_eff , ///< Efficacite spectrale du noeud2 mesure par le noeud1
|
|
||||||
Transaction_t Trans_id ///< transaction id associated to this message
|
|
||||||
)
|
|
||||||
{
|
|
||||||
msg_t *msg = RRM_CALLOC(msg_t , 1 ) ;
|
|
||||||
|
|
||||||
if ( msg != NULL ) {
|
|
||||||
pusu_link_info_t *p = RRM_CALLOC(pusu_link_info_t , 1 );
|
|
||||||
|
|
||||||
if ( p != NULL ) {
|
|
||||||
init_pusu_msg_head(&msg->head, inst, RRM_LINK_INFO_IND, sizeof(pusu_link_info_t),Trans_id);
|
|
||||||
|
|
||||||
p->rssi = rssi ;
|
|
||||||
p->spec_eff = spec_eff ;
|
|
||||||
memcpy( &p->noeud1, &noeud1, sizeof(L2_ID) ) ;
|
|
||||||
memcpy( &p->noeud2, &noeud2, sizeof(L2_ID) ) ;
|
|
||||||
}
|
|
||||||
|
|
||||||
msg->data = (char *) p ;
|
|
||||||
}
|
|
||||||
|
|
||||||
return msg ;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief La fonction formate en un message de mesure de voisnage a envoyer sur
|
|
||||||
le socket du PUSU.
|
|
||||||
|
|
||||||
\return message formate
|
|
||||||
*/
|
|
||||||
msg_t *msg_rrm_sensing_info_ind(
|
|
||||||
Instance_t inst , ///< Instance associated to this message
|
|
||||||
L2_ID noeud1 , ///< L2_ID du noeud 1
|
|
||||||
L2_ID noeud2 , ///< L2_ID du noeud 2
|
|
||||||
unsigned char rssi , ///< RSSI du noeud2 mesure par le noeud1
|
|
||||||
Transaction_t Trans_id ///< transaction id associated to this message
|
|
||||||
)
|
|
||||||
{
|
|
||||||
msg_t *msg = RRM_CALLOC(msg_t , 1 ) ;
|
|
||||||
|
|
||||||
if ( msg != NULL ) {
|
|
||||||
pusu_sensing_info_t *p = RRM_CALLOC(pusu_sensing_info_t , 1 );
|
|
||||||
|
|
||||||
if ( p != NULL ) {
|
|
||||||
init_pusu_msg_head(&msg->head, inst, RRM_SENSING_INFO_IND, sizeof(pusu_sensing_info_t),Trans_id);
|
|
||||||
|
|
||||||
p->rssi = rssi ;
|
|
||||||
memcpy( &p->noeud1, &noeud1, sizeof(L2_ID) ) ;
|
|
||||||
memcpy( &p->noeud2, &noeud2, sizeof(L2_ID) ) ;
|
|
||||||
}
|
|
||||||
|
|
||||||
msg->data = (char *) p ;
|
|
||||||
}
|
|
||||||
|
|
||||||
return msg ;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief La fonction formate en un message de charge de cluster a envoyer sur
|
|
||||||
le socket du PUSU.
|
|
||||||
\return message formate
|
|
||||||
*/
|
|
||||||
msg_t *msg_rrm_ch_load_ind(
|
|
||||||
Instance_t inst , ///< Instance associated to this message
|
|
||||||
unsigned char load , ///< Charge du cluster
|
|
||||||
Transaction_t Trans_id ///< transaction id associated to this message
|
|
||||||
)
|
|
||||||
{
|
|
||||||
msg_t *msg = RRM_CALLOC(msg_t , 1 ) ;
|
|
||||||
|
|
||||||
if ( msg != NULL ) {
|
|
||||||
pusu_ch_load_t *p = RRM_CALLOC(pusu_ch_load_t , 1 );
|
|
||||||
|
|
||||||
if ( p != NULL ) {
|
|
||||||
init_pusu_msg_head(&msg->head, inst, RRM_CH_LOAD_IND, sizeof(pusu_ch_load_t),Trans_id);
|
|
||||||
|
|
||||||
p->load = load ;
|
|
||||||
}
|
|
||||||
|
|
||||||
msg->data = (char *) p ;
|
|
||||||
}
|
|
||||||
|
|
||||||
return msg ;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief La fonction formate en un message d'annonce de nouveau service
|
|
||||||
envoyer sur le socket du PUSU.
|
|
||||||
\return message formate
|
|
||||||
*/
|
|
||||||
msg_t *msg_pusu_resp(
|
|
||||||
Instance_t inst , ///< Instance associated to this message
|
|
||||||
MSG_RRM_PUSU_T response , ///< identification de la reponse
|
|
||||||
Transaction_t Trans_id ///< transaction id associated to this message
|
|
||||||
)
|
|
||||||
{
|
|
||||||
msg_t *msg = RRM_CALLOC(msg_t , 1 ) ;
|
|
||||||
|
|
||||||
if ( msg != NULL ) {
|
|
||||||
// Header only
|
|
||||||
init_pusu_msg_head(&msg->head, inst, response, 0,Trans_id);
|
|
||||||
|
|
||||||
msg->data = NULL ;
|
|
||||||
}
|
|
||||||
|
|
||||||
return msg ;
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -1,148 +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 pusu_msg.h
|
|
||||||
|
|
||||||
\brief Fichier d'entete contenant les declarations des types, des defines ,
|
|
||||||
et des fonctions relatives aux messages RRM->PUSU.
|
|
||||||
|
|
||||||
Les fonctions servent à créer le buffer de message, remplir l'entete
|
|
||||||
et copier les parametres de fonction. Chaque fonction retourne le
|
|
||||||
message qui pourra être envoye sur le socket.
|
|
||||||
|
|
||||||
\author BURLOT Pascal
|
|
||||||
|
|
||||||
\date 29/08/08
|
|
||||||
|
|
||||||
|
|
||||||
\par Historique:
|
|
||||||
$Author$ $Date$ $Revision$
|
|
||||||
$Id$
|
|
||||||
$Log$
|
|
||||||
|
|
||||||
*******************************************************************************
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef PUSU_MSG_H
|
|
||||||
#define PUSU_MSG_H
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
//! Definition de la taille de l'identification niveau 2
|
|
||||||
#define IEEE80211_MAC_ADDR_LEN 8
|
|
||||||
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief Enumeration des messages entre le RRM et PUSU
|
|
||||||
*/
|
|
||||||
typedef enum {
|
|
||||||
RRM_PUBLISH_IND = 0 , ///< Annonce de nouveau service
|
|
||||||
PUSU_PUBLISH_RESP , ///< Reponse de PUSU_PUBLISH_IND
|
|
||||||
RRM_UNPUBLISH_IND , ///< Annonce de retrait d'un service
|
|
||||||
PUSU_UNPUBLISH_RESP , ///< Reponse de PUSU_UNPUBLISH_IND
|
|
||||||
RRM_LINK_INFO_IND , ///< Info sur un lien (oriente)
|
|
||||||
PUSU_LINK_INFO_RESP , ///< Reponse de PUSU_LINK_INFO_IND
|
|
||||||
RRM_SENSING_INFO_IND , ///< Info sur un voisin (oriente)
|
|
||||||
PUSU_SENSING_INFO_RESP , ///< Reponse de RRM_SENSING_INFO_IND
|
|
||||||
RRM_CH_LOAD_IND , ///< Info sur la charge d'un cluster
|
|
||||||
PUSU_CH_LOAD_RESP , ///< Reponse de PUSU_CH_LOAD_IND
|
|
||||||
NB_MSG_RRM_PUSU ///< Nombre de message de l'interface
|
|
||||||
}
|
|
||||||
MSG_RRM_PUSU_T ;
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief Enumeration des services entre le RRM et PUSU
|
|
||||||
*/
|
|
||||||
typedef enum {
|
|
||||||
PUSU_RRM_SERVICE = 0xAA ///< service d'un information RRM vers le TRM
|
|
||||||
} SERVICE_RRM_PUSU_T ;
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief Definition de publish/unpublish
|
|
||||||
*/
|
|
||||||
typedef struct {
|
|
||||||
int service_type ; ///< type de service
|
|
||||||
} pusu_publish_t , pusu_unpublish_t ;
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief Definition des informations remontees au TRM relatives a un lien
|
|
||||||
*/
|
|
||||||
typedef struct {
|
|
||||||
L2_ID noeud1 ; ///< L2_ID du noeud 1
|
|
||||||
L2_ID noeud2 ; ///< L2_ID du noeud 2
|
|
||||||
RB_ID rb_id ; ///< identification du lien
|
|
||||||
unsigned char rssi ; ///< metrique RSSI
|
|
||||||
unsigned char spec_eff ; ///< metrique Efficacite spectrale
|
|
||||||
} pusu_link_info_t;
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief Definition des informations remontees au TRM relatives a un voisin
|
|
||||||
sans notion de lien etabli obligatoirement
|
|
||||||
*/
|
|
||||||
typedef struct {
|
|
||||||
L2_ID noeud1 ; ///< L2_ID du noeud 1
|
|
||||||
L2_ID noeud2 ; ///< L2_ID du noeud 2
|
|
||||||
unsigned char rssi ; ///< metrique RSSI
|
|
||||||
} pusu_sensing_info_t;
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief Definition de la structure d'information de charge du cluster remontee
|
|
||||||
au TRM
|
|
||||||
*/
|
|
||||||
typedef struct {
|
|
||||||
unsigned char load ; ///< la charge du cluster
|
|
||||||
} pusu_ch_load_t;
|
|
||||||
|
|
||||||
#ifdef TRACE
|
|
||||||
extern const char *Str_msg_pusu_rrm[NB_MSG_RRM_PUSU] ;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
msg_t *msg_rrm_publish_ind(Instance_t inst, int service, Transaction_t Trans_id );
|
|
||||||
msg_t *msg_rrm_unpublish_ind(Instance_t inst, int service, Transaction_t Trans_id );
|
|
||||||
msg_t *msg_rrm_link_info_ind(Instance_t inst, L2_ID noeud1, L2_ID noeud2, RB_ID rb_id, unsigned char rssi ,unsigned char spec_eff, Transaction_t Trans_id ) ;
|
|
||||||
msg_t *msg_rrm_sensing_info_ind(Instance_t inst, L2_ID noeud1, L2_ID noeud2, unsigned char rssi, Transaction_t Trans_id ) ;
|
|
||||||
msg_t *msg_rrm_ch_load_ind(Instance_t inst, unsigned char load, Transaction_t Trans_id );
|
|
||||||
msg_t *msg_pusu_resp(Instance_t inst, MSG_RRM_PUSU_T response, Transaction_t Trans_id );
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif /* PUSU_MSG_H */
|
|
||||||
@@ -1,377 +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 rb_db.c
|
|
||||||
|
|
||||||
\brief Fonctions permettant la gestion de la base de donnée sur les radio-
|
|
||||||
bearers du cluster par le cluster head
|
|
||||||
|
|
||||||
\author BURLOT Pascal
|
|
||||||
|
|
||||||
\date 29/08/08
|
|
||||||
|
|
||||||
|
|
||||||
\par Historique:
|
|
||||||
$Author$ $Date$ $Revision$
|
|
||||||
$Id$
|
|
||||||
$Log$
|
|
||||||
|
|
||||||
*******************************************************************************
|
|
||||||
*/
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <errno.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <unistd.h>
|
|
||||||
|
|
||||||
#include <sys/socket.h>
|
|
||||||
#include <sys/un.h>
|
|
||||||
|
|
||||||
#include <pthread.h>
|
|
||||||
|
|
||||||
#include "debug.h"
|
|
||||||
#include "L3_rrc_defs.h"
|
|
||||||
#include "rrm_util.h"
|
|
||||||
#include "rb_db.h"
|
|
||||||
|
|
||||||
//! Selection locale du mode de debug
|
|
||||||
#define DBG_RB_DB 0
|
|
||||||
|
|
||||||
#if DBG_RB_DB==0
|
|
||||||
//! Macro inactive
|
|
||||||
#define PRINT_RB_DB(...)
|
|
||||||
#else
|
|
||||||
//! Macro affichant la liste des radio bearers
|
|
||||||
#define PRINT_RB_DB(...) print_rb_db( __VA_ARGS__ )
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief La fonction affiche a l'ecran la liste (pour du debug)
|
|
||||||
|
|
||||||
\return aucune valeur retournee
|
|
||||||
*/
|
|
||||||
static void print_rb_db(
|
|
||||||
RB_desc_t *pEntry ///< pointeur sur le debut de liste
|
|
||||||
)
|
|
||||||
{
|
|
||||||
unsigned int i ;
|
|
||||||
RB_desc_t *pCurrentItem = pEntry;
|
|
||||||
|
|
||||||
fprintf(stderr,"RB list=[\n");
|
|
||||||
|
|
||||||
while ( pCurrentItem != NULL) {
|
|
||||||
fprintf(stderr," @%p(.Trans_id=%d, .Rb_id=%d, .Rb_type=%d",
|
|
||||||
pCurrentItem, pCurrentItem->Trans_id,
|
|
||||||
pCurrentItem->Rb_id, pCurrentItem->RB_type);
|
|
||||||
|
|
||||||
fprintf(stderr,", @SRC=");
|
|
||||||
|
|
||||||
for ( i=0; i<8; i++)
|
|
||||||
fprintf(stderr,"%02X", pCurrentItem->L2_id[0].L2_id[i]);
|
|
||||||
|
|
||||||
fprintf(stderr,", @DST=");
|
|
||||||
|
|
||||||
for ( i=0; i<8; i++)
|
|
||||||
fprintf(stderr,"%02X", pCurrentItem->L2_id[1].L2_id[i]);
|
|
||||||
|
|
||||||
fprintf(stderr,", .QoS_class=%d", pCurrentItem->QoS_class );
|
|
||||||
|
|
||||||
/*
|
|
||||||
fprintf(stderr,",\n .Lchan_desc=%p(",&(pCurrentItem->Lchan_desc));
|
|
||||||
fprintf(stderr,".transport_block_size=%d,",pCurrentItem->Lchan_desc.transport_block_size);
|
|
||||||
fprintf(stderr,".max_transport_blocks=%d,",pCurrentItem->Lchan_desc.max_transport_blocks);
|
|
||||||
fprintf(stderr,".Guaranteed_bit_rate=%ld,",pCurrentItem->Lchan_desc.Guaranteed_bit_rate);
|
|
||||||
fprintf(stderr,".Max_bit_rate=%ld,",pCurrentItem->Lchan_desc.Max_bit_rate);
|
|
||||||
fprintf(stderr,".Delay_class=%d,",pCurrentItem->Lchan_desc.Delay_class);
|
|
||||||
fprintf(stderr,".Target_bler=%d,",pCurrentItem->Lchan_desc.Target_bler);
|
|
||||||
fprintf(stderr,".LCHAN_t=%d),",pCurrentItem->Lchan_desc.LCHAN_t);
|
|
||||||
|
|
||||||
fprintf(stderr,",\n .Mac_rlc_meas_desc=%p(",&(pCurrentItem->Mac_rlc_meas_desc));
|
|
||||||
fprintf(stderr,".Meas_trigger=%p(",&(pCurrentItem->Mac_rlc_meas_desc.Meas_trigger));
|
|
||||||
fprintf(stderr,".Rssi=%d, ",pCurrentItem->Mac_rlc_meas_desc.Meas_trigger.Rssi);
|
|
||||||
fprintf(stderr,".Sinr=%d, ",pCurrentItem->Mac_rlc_meas_desc.Meas_trigger.Sinr);
|
|
||||||
fprintf(stderr,".Harq_delay=%u, ",pCurrentItem->Mac_rlc_meas_desc.Meas_trigger.Harq_delay);
|
|
||||||
fprintf(stderr,".Bler=%u,",pCurrentItem->Mac_rlc_meas_desc.Meas_trigger.Bler);
|
|
||||||
fprintf(stderr,".Spec_eff=%u), ",pCurrentItem->Mac_rlc_meas_desc.Meas_trigger.Spec_eff);
|
|
||||||
fprintf(stderr,".Mac_avg=%p(",&(pCurrentItem->Mac_rlc_meas_desc.Mac_avg));
|
|
||||||
fprintf(stderr,".Rssi_forgetting_factor=%u, ",pCurrentItem->Mac_rlc_meas_desc.Mac_avg.Rssi_forgetting_factor);
|
|
||||||
fprintf(stderr,".Sinr_forgetting_factor=%u, ",pCurrentItem->Mac_rlc_meas_desc.Mac_avg.Sinr_forgetting_factor);
|
|
||||||
fprintf(stderr,".Harq_delay_forgetting_factor=%u, ",pCurrentItem->Mac_rlc_meas_desc.Mac_avg.Harq_delay_forgetting_factor);
|
|
||||||
fprintf(stderr,".Bler_forgetting_factor=%u, ",pCurrentItem->Mac_rlc_meas_desc.Mac_avg.Bler_forgetting_factor);
|
|
||||||
fprintf(stderr,".Spec_eff_forgetting_factor=%u),\n",pCurrentItem->Mac_rlc_meas_desc.Mac_avg.Spec_eff_forgetting_factor);
|
|
||||||
fprintf(stderr," .bo_forgetting_factor=%u,",pCurrentItem->Mac_rlc_meas_desc.bo_forgetting_factor);
|
|
||||||
fprintf(stderr,".sdu_loss_trigger=%u,",pCurrentItem->Mac_rlc_meas_desc.sdu_loss_trigger);
|
|
||||||
fprintf(stderr,".Rep_amount=%u,",pCurrentItem->Mac_rlc_meas_desc.Rep_amount);
|
|
||||||
fprintf(stderr,".Rep_interval=%d,",pCurrentItem->Mac_rlc_meas_desc.Rep_interval);
|
|
||||||
*/
|
|
||||||
|
|
||||||
fprintf(stderr,", .next=%p)\n", pCurrentItem->next );
|
|
||||||
|
|
||||||
pCurrentItem = pCurrentItem->next ;
|
|
||||||
}
|
|
||||||
|
|
||||||
fprintf(stderr," ]\n");
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief La fonction ajoute un rb dans la liste des RB ouverts du Cluster head.
|
|
||||||
|
|
||||||
\return retourne la valeur du nouvel element
|
|
||||||
*/
|
|
||||||
RB_desc_t *add_rb(
|
|
||||||
RB_desc_t **rb_entry , ///< pointeur sur l'entree de la liste des RB
|
|
||||||
Transaction_t Trans_id , ///< transaction associee
|
|
||||||
QOS_CLASS_T QoS_class , ///< index de la classe de QoS
|
|
||||||
L2_ID *L2_id ///< ID de niveau 2 des noeuds associes au RB
|
|
||||||
)
|
|
||||||
{
|
|
||||||
RB_desc_t *pOldEntry = *rb_entry;
|
|
||||||
RB_desc_t *pNewItem = RRM_CALLOC( RB_desc_t , 1 ) ;
|
|
||||||
|
|
||||||
PNULL(pNewItem) ;
|
|
||||||
|
|
||||||
if ( pNewItem == NULL )
|
|
||||||
return NULL ;
|
|
||||||
|
|
||||||
pNewItem->QoS_class = QoS_class ;
|
|
||||||
|
|
||||||
memcpy( &(pNewItem->L2_id[0]) , L2_id, 2*sizeof(L2_ID) ) ;
|
|
||||||
|
|
||||||
pNewItem->Trans_id = Trans_id ;
|
|
||||||
pNewItem->Rb_id = 0 ;
|
|
||||||
pNewItem->RB_type = 0;
|
|
||||||
|
|
||||||
*rb_entry = pNewItem ;
|
|
||||||
pNewItem->next = pOldEntry;
|
|
||||||
|
|
||||||
PRINT_RB_DB( *rb_entry );
|
|
||||||
return pNewItem ;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief La fonction retire l'element identifie par le RB_id de la liste des RB
|
|
||||||
|
|
||||||
\return aucune valeur.
|
|
||||||
*/
|
|
||||||
void del_rb_by_rbid(
|
|
||||||
RB_desc_t **rb_entry , ///< pointeur sur l'entree de la liste des RB
|
|
||||||
RB_ID Rb_id ///< ID du RB a detruire
|
|
||||||
)
|
|
||||||
{
|
|
||||||
RB_desc_t *pCurrentItem = *rb_entry;
|
|
||||||
RB_desc_t *pNextItem ;
|
|
||||||
RB_desc_t **ppPrevItem = rb_entry ;
|
|
||||||
|
|
||||||
if ( (pCurrentItem == NULL) || (rb_entry==NULL))
|
|
||||||
return ;
|
|
||||||
|
|
||||||
while ( pCurrentItem != NULL ) {
|
|
||||||
pNextItem = pCurrentItem->next ;
|
|
||||||
|
|
||||||
if ( Rb_id == pCurrentItem->Rb_id ) {
|
|
||||||
*ppPrevItem = pNextItem;
|
|
||||||
RRM_FREE( pCurrentItem ) ;
|
|
||||||
PRINT_RB_DB( *rb_entry );
|
|
||||||
return ;
|
|
||||||
}
|
|
||||||
|
|
||||||
ppPrevItem = &(pCurrentItem->next) ;
|
|
||||||
pCurrentItem = pNextItem ;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( pCurrentItem == NULL )
|
|
||||||
fprintf(stderr, "ERROR: RB_id (%d) unknown\n", Rb_id ) ;
|
|
||||||
|
|
||||||
PRINT_RB_DB( *rb_entry );
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief La fonction retire l'element identifie par le Trans_id de la liste des RB
|
|
||||||
|
|
||||||
\return aucune valeur.
|
|
||||||
*/
|
|
||||||
void del_rb_by_transid(
|
|
||||||
RB_desc_t **rb_entry , ///< pointeur sur l'entree de la liste des RB
|
|
||||||
Transaction_t Trans_id ///< transaction identifiant le RB
|
|
||||||
)
|
|
||||||
{
|
|
||||||
RB_desc_t *pCurrentItem = *rb_entry;
|
|
||||||
RB_desc_t *pNextItem ;
|
|
||||||
RB_desc_t **ppPrevItem = rb_entry ;
|
|
||||||
|
|
||||||
if ( (pCurrentItem == NULL) || (rb_entry==NULL))
|
|
||||||
return ;
|
|
||||||
|
|
||||||
while ( pCurrentItem != NULL ) {
|
|
||||||
pNextItem = pCurrentItem->next ;
|
|
||||||
|
|
||||||
if ( Trans_id == pCurrentItem->Trans_id ) {
|
|
||||||
*ppPrevItem = pNextItem;
|
|
||||||
RRM_FREE( pCurrentItem ) ;
|
|
||||||
PRINT_RB_DB( *rb_entry );
|
|
||||||
return ;
|
|
||||||
}
|
|
||||||
|
|
||||||
ppPrevItem = &(pCurrentItem->next) ;
|
|
||||||
pCurrentItem = pNextItem ;
|
|
||||||
}
|
|
||||||
|
|
||||||
PRINT_RB_DB( *rb_entry );
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief La fonction detruit entierement la liste des RB
|
|
||||||
|
|
||||||
\return aucune valeur.
|
|
||||||
*/
|
|
||||||
void del_all_rb(
|
|
||||||
RB_desc_t **rb_entry ///< pointeur sur l'entree de la liste des RB
|
|
||||||
)
|
|
||||||
{
|
|
||||||
RB_desc_t *pCurrentItem = *rb_entry;
|
|
||||||
RB_desc_t *pNextItem ;
|
|
||||||
|
|
||||||
if ( (pCurrentItem == NULL) || (rb_entry==NULL))
|
|
||||||
return ;
|
|
||||||
|
|
||||||
while ( pCurrentItem != NULL ) {
|
|
||||||
pNextItem = pCurrentItem->next ;
|
|
||||||
RRM_FREE( pCurrentItem ) ;
|
|
||||||
pCurrentItem = pNextItem ;
|
|
||||||
}
|
|
||||||
|
|
||||||
*rb_entry = NULL ;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief La fonction recherche le descripteur de RB identifie par le RB_id
|
|
||||||
la liste des RBs
|
|
||||||
|
|
||||||
\return pointeur sur le descripteur de RB trouve sinon NULL .
|
|
||||||
*/
|
|
||||||
RB_desc_t *get_rb_desc_by_rbid(
|
|
||||||
RB_desc_t *rb_entry , ///< pointeur sur l'entree de la liste des RB
|
|
||||||
RB_ID Rb_id ///< Id du descripteur de RB recherchee
|
|
||||||
)
|
|
||||||
{
|
|
||||||
RB_desc_t *pCurrentItem = rb_entry;
|
|
||||||
|
|
||||||
while ( pCurrentItem != NULL) {
|
|
||||||
if ( Rb_id == pCurrentItem->Rb_id )
|
|
||||||
break ;
|
|
||||||
|
|
||||||
pCurrentItem = pCurrentItem->next ;
|
|
||||||
}
|
|
||||||
|
|
||||||
return pCurrentItem ;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief La fonction recherche le descripteur de RB identifie par le Trans_id
|
|
||||||
la liste des RBs
|
|
||||||
|
|
||||||
\return pointeur sur le descripteur de RB trouve sinon NULL .
|
|
||||||
*/
|
|
||||||
RB_desc_t *get_rb_desc_by_transid(
|
|
||||||
RB_desc_t *rb_entry , ///< pointeur sur l'entree de la liste des RB
|
|
||||||
Transaction_t Trans_id ///< transaction du descripteur de RB recherchee
|
|
||||||
)
|
|
||||||
{
|
|
||||||
RB_desc_t *pCurrentItem = rb_entry;
|
|
||||||
|
|
||||||
while ( pCurrentItem != NULL) {
|
|
||||||
if ( Trans_id == pCurrentItem->Trans_id )
|
|
||||||
break ;
|
|
||||||
|
|
||||||
pCurrentItem = pCurrentItem->next ;
|
|
||||||
}
|
|
||||||
|
|
||||||
return pCurrentItem ;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief La fonction rafraichit les champs Rb_id, RB_type d'un descripteur
|
|
||||||
de RB identifie par le Trans_id la liste des RBs .
|
|
||||||
|
|
||||||
\return aucune valeur
|
|
||||||
*/
|
|
||||||
void update_rb_desc(
|
|
||||||
RB_desc_t *rb_entry , ///< pointeur sur un element de la liste des RB
|
|
||||||
Transaction_t Trans_id , ///< transaction id
|
|
||||||
RB_ID Rb_id , ///< RB id
|
|
||||||
RB_TYPE RB_type ///< type de RB
|
|
||||||
)
|
|
||||||
{
|
|
||||||
RB_desc_t *pItem = get_rb_desc_by_transid(rb_entry,Trans_id);
|
|
||||||
|
|
||||||
if ( pItem != NULL) {
|
|
||||||
pItem->Trans_id= -1 ;
|
|
||||||
pItem->Rb_id = Rb_id ;
|
|
||||||
pItem->RB_type = RB_type ;
|
|
||||||
}
|
|
||||||
|
|
||||||
PRINT_RB_DB( rb_entry );
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief La fonction rafraichit le champs Rb_meas d'un RB identifie dans la
|
|
||||||
liste des RBs .
|
|
||||||
|
|
||||||
\return aucune valeur
|
|
||||||
*/
|
|
||||||
void update_rb_meas(
|
|
||||||
RB_desc_t *rb_entry , ///< pointeur sur un element de la liste des RB
|
|
||||||
RB_ID Rb_id , ///< RB id
|
|
||||||
L2_ID *L2_id , ///< ID de niveau 2 d'un des noeuds du RB
|
|
||||||
MAC_RLC_MEAS_T *Rb_meas ///< mesure RB effectue par le noeud
|
|
||||||
)
|
|
||||||
{
|
|
||||||
RB_desc_t *pItem = get_rb_desc_by_rbid(rb_entry,Rb_id);
|
|
||||||
|
|
||||||
if ( pItem != NULL) {
|
|
||||||
if ( memcmp(L2_id, &pItem->L2_id[0], sizeof(L2_ID) ) == 0 ) {
|
|
||||||
memcpy( &pItem->Rb_meas[0],Rb_meas, sizeof(MAC_RLC_MEAS_T) ) ;
|
|
||||||
} else if ( memcmp(L2_id, &pItem->L2_id[1], sizeof(L2_ID) ) == 0 ) {
|
|
||||||
memcpy( &pItem->Rb_meas[1],Rb_meas, sizeof(MAC_RLC_MEAS_T) ) ;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,88 +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 rb_db.h
|
|
||||||
|
|
||||||
\brief Fichier d'entete contenant les declarations des types, des defines ,
|
|
||||||
et des fonctions relatives a la gestion de la base de donnée sur
|
|
||||||
les radio bearers par le cluster head.
|
|
||||||
|
|
||||||
\author BURLOT Pascal
|
|
||||||
|
|
||||||
\date 29/08/08
|
|
||||||
|
|
||||||
|
|
||||||
\par Historique:
|
|
||||||
$Author$ $Date$ $Revision$
|
|
||||||
$Id$
|
|
||||||
$Log$
|
|
||||||
|
|
||||||
*******************************************************************************
|
|
||||||
*/
|
|
||||||
#ifndef RB_DB_H
|
|
||||||
#define RB_DB_H
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief Structure de liste decrivant un radio bearer (RB)
|
|
||||||
*/
|
|
||||||
typedef struct RB_desc_s {
|
|
||||||
Transaction_t Trans_id ; ///< transaction associe au RB
|
|
||||||
RB_ID Rb_id ; ///< ID du RB
|
|
||||||
RB_TYPE RB_type ; ///< type de RB
|
|
||||||
QOS_CLASS_T QoS_class ; ///< index sur la classe de QoS du RB
|
|
||||||
L2_ID L2_id[2] ; ///< ID de niveau 2 des noeuds du RB
|
|
||||||
MAC_RLC_MEAS_T Rb_meas[2] ; ///< Description de mesures RB associes a chaque noeud
|
|
||||||
struct RB_desc_s *next ; ///< pointeur sur le prochain descripteur de RB
|
|
||||||
} RB_desc_t ;
|
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
|
||||||
|
|
||||||
|
|
||||||
RB_desc_t *add_rb( RB_desc_t **rb_entry,Transaction_t Trans_id, QOS_CLASS_T QoS_class, L2_ID *L2_id ) ;
|
|
||||||
void del_rb_by_rbid( RB_desc_t **rb_entry, RB_ID Rb_id ) ;
|
|
||||||
void del_rb_by_transid( RB_desc_t **rb_entry, Transaction_t Trans_id ) ;
|
|
||||||
void del_all_rb( RB_desc_t **rb_entry ) ;
|
|
||||||
RB_desc_t *get_rb_desc_by_rbid( RB_desc_t *rb_entry, RB_ID Rb_id ) ;
|
|
||||||
RB_desc_t *get_rb_desc_by_transid(RB_desc_t *rb_entry, Transaction_t Trans_id ) ;
|
|
||||||
void update_rb_desc( RB_desc_t *rb_entry, Transaction_t Trans_id, RB_ID Rb_id, RB_TYPE RB_type );
|
|
||||||
void update_rb_meas( RB_desc_t *rb_entry, RB_ID Rb_id, L2_ID*L2_id, MAC_RLC_MEAS_T *Rb_meas );
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif /* RB_DB_H */
|
|
||||||
@@ -1,571 +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 rb_mngt.c
|
|
||||||
|
|
||||||
\brief Fonctions permettant la gestion des radio bearers du cluster par
|
|
||||||
le cluster head
|
|
||||||
|
|
||||||
\author BURLOT Pascal
|
|
||||||
|
|
||||||
\date 29/08/08
|
|
||||||
|
|
||||||
|
|
||||||
\par Historique:
|
|
||||||
P.BURLOT 2009-01-20
|
|
||||||
+ separation de la file de message CMM/RRM a envoyer en 2 files
|
|
||||||
distinctes ( file_send_cmm_msg, file_send_rrc_msg)
|
|
||||||
L. IACOBELLI 2010-01-05
|
|
||||||
+ inclusions
|
|
||||||
|
|
||||||
*******************************************************************************
|
|
||||||
*/
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <errno.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <unistd.h>
|
|
||||||
|
|
||||||
#include <sys/socket.h>
|
|
||||||
#include <sys/un.h>
|
|
||||||
|
|
||||||
#include <pthread.h>
|
|
||||||
|
|
||||||
#include "debug.h"
|
|
||||||
#include "L3_rrc_defs.h"
|
|
||||||
#include "L3_rrc_interface.h"
|
|
||||||
#include "cmm_rrm_interface.h"
|
|
||||||
#include "rrm_sock.h"
|
|
||||||
#include "rrc_rrm_msg.h"
|
|
||||||
#include "cmm_msg.h"
|
|
||||||
#include "pusu_msg.h"
|
|
||||||
#include "msg_mngt.h"
|
|
||||||
#include "rb_db.h"
|
|
||||||
#include "neighbor_db.h"
|
|
||||||
#include "sens_db.h"
|
|
||||||
#include "channels_db.h"
|
|
||||||
#include "rrm_util.h"
|
|
||||||
#include "transact.h"
|
|
||||||
#include "rrm_constant.h"
|
|
||||||
#include "rrm.h"
|
|
||||||
#include "rb_mngt.h"
|
|
||||||
|
|
||||||
//! Met un message dans la file des messages a envoyer
|
|
||||||
#define PUT_CMM_MSG(m) put_msg( &(rrm->file_send_cmm_msg), 0, rrm->cmm.s,m ) //mod_lor_10_01_25
|
|
||||||
#define PUT_PUSU_MSG(m) put_msg( &(rrm->file_send_cmm_msg), 0, rrm->pusu.s,m) //mod_lor_10_01_25
|
|
||||||
#define PUT_RRC_MSG(m) put_msg( &(rrm->file_send_rrc_msg), 0, rrm->rrc.s,m ) //mod_lor_10_01_25
|
|
||||||
|
|
||||||
/*
|
|
||||||
* =========================================================================
|
|
||||||
* OUVERTURE D'UN RADIO BEARER
|
|
||||||
* =========================================================================
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief CMM connection setup request. Only in CH. It asks to create a
|
|
||||||
* connection p2p between CH and MR
|
|
||||||
*/
|
|
||||||
int cmm_cx_setup_req(
|
|
||||||
Instance_t inst , //!< Identification de l'instance
|
|
||||||
L2_ID Src , //!< L2 source MAC address
|
|
||||||
L2_ID Dst , //!< L2 destination MAC address
|
|
||||||
QOS_CLASS_T QoS_class , //!< QOS class index
|
|
||||||
Transaction_t Trans_id //!< Transaction ID
|
|
||||||
)
|
|
||||||
{
|
|
||||||
int ret = -1 ;
|
|
||||||
rrm_t *rrm = &rrm_inst[inst] ;
|
|
||||||
|
|
||||||
if ( (rrm->state == CLUSTERHEAD_INIT1 ) || (rrm->state == CLUSTERHEAD ) ) {
|
|
||||||
L2_ID src_dst[2] ;
|
|
||||||
memcpy(&src_dst[0], &Src, sizeof(L2_ID)) ;
|
|
||||||
memcpy(&src_dst[1], &Dst, sizeof(L2_ID)) ;
|
|
||||||
|
|
||||||
pthread_mutex_lock( &( rrm->cmm.exclu ) ) ;
|
|
||||||
//fprintf(stderr,"item_trans in CMM_CX_SETUP_REQ=%d node %d\n",rrm->cmm.trans_cnt,rrm->id);//dbg
|
|
||||||
add_item_transact( &(rrm->cmm.transaction), Trans_id,INT_CMM,CMM_CX_SETUP_REQ, 0,NO_PARENT);
|
|
||||||
pthread_mutex_unlock( &( rrm->cmm.exclu ) ) ;
|
|
||||||
|
|
||||||
/** \todo Evaluer si le RB peut etre cree avant d'envoyer la commande au RRC */
|
|
||||||
pthread_mutex_lock( &( rrm->rrc.exclu ) ) ;
|
|
||||||
rrm->rrc.trans_cnt++ ;
|
|
||||||
//fprintf(stderr,"item_trans in RRM_RB_ESTABLISH_REQ=%d node %d\n",rrm->rrc.trans_cnt,rrm->id);//dbg
|
|
||||||
add_item_transact( &(rrm->rrc.transaction), rrm->rrc.trans_cnt ,INT_RRC,RRM_RB_ESTABLISH_REQ,Trans_id,PARENT);
|
|
||||||
add_rb( &(rrm->rrc.pRbEntry), rrm->rrc.trans_cnt, QoS_class, &src_dst[0] ) ;
|
|
||||||
pthread_mutex_unlock( &( rrm->rrc.exclu ) ) ;
|
|
||||||
|
|
||||||
PUT_RRC_MSG(
|
|
||||||
msg_rrm_rb_establish_req(inst,
|
|
||||||
&Lchan_desc[QoS_class],
|
|
||||||
&Mac_rlc_meas_desc[QoS_class],
|
|
||||||
&src_dst[0] ,
|
|
||||||
rrm->rrc.trans_cnt,
|
|
||||||
NULL,NONE_L3)
|
|
||||||
) ;
|
|
||||||
|
|
||||||
if(QoS_class == QOS_DTCH_D) { //faire le srb2 seulement a l'attachement (ouverture du DTCH IP par Defaut)
|
|
||||||
pthread_mutex_lock( &( rrm->rrc.exclu ) ) ;
|
|
||||||
rrm->rrc.trans_cnt++ ;
|
|
||||||
//fprintf(stderr,"item_trans in RRM_RB_ESTABLISH_REQ 2=%d node %d\n",rrm->rrc.trans_cnt,rrm->id);//dbg
|
|
||||||
add_item_transact( &(rrm->rrc.transaction), rrm->rrc.trans_cnt ,INT_RRC,RRM_RB_ESTABLISH_REQ,0,NO_PARENT);
|
|
||||||
add_rb( &(rrm->rrc.pRbEntry), rrm->rrc.trans_cnt, QOS_SRB2, &src_dst[0] ) ;
|
|
||||||
pthread_mutex_unlock( &( rrm->rrc.exclu ) ) ;
|
|
||||||
|
|
||||||
|
|
||||||
PUT_RRC_MSG(
|
|
||||||
msg_rrm_rb_establish_req(inst,
|
|
||||||
&Lchan_desc[QOS_SRB2],
|
|
||||||
&Mac_rlc_meas_desc[QOS_SRB2],
|
|
||||||
&src_dst[0] ,
|
|
||||||
rrm->rrc.trans_cnt,
|
|
||||||
rrm->L3_info,rrm->L3_info_t)
|
|
||||||
) ;
|
|
||||||
}
|
|
||||||
|
|
||||||
ret = 0 ;
|
|
||||||
} else {
|
|
||||||
if ( rrm->state == CLUSTERHEAD_INIT0 ) {
|
|
||||||
L2_ID src_dst[2] ;
|
|
||||||
|
|
||||||
pthread_mutex_lock( &( rrm->cmm.exclu ) ) ;
|
|
||||||
//fprintf(stderr,"item_trans in CMM_CX_SETUP_REQ 2=%d node %d\n",rrm->cmm.trans_cnt,rrm->id);//dbg
|
|
||||||
add_item_transact( &(rrm->cmm.transaction), Trans_id, INT_CMM, CMM_CX_SETUP_REQ,0,NO_PARENT);
|
|
||||||
pthread_mutex_unlock( &( rrm->cmm.exclu ) ) ;
|
|
||||||
|
|
||||||
/** \todo Evaluer si le RB peut etre cree avant de solliciter le RRC */
|
|
||||||
pthread_mutex_lock( &( rrm->rrc.exclu ) ) ;
|
|
||||||
|
|
||||||
memcpy(&src_dst[0], &Src, sizeof(L2_ID)) ;
|
|
||||||
memcpy(&src_dst[1], &Dst, sizeof(L2_ID)) ;
|
|
||||||
|
|
||||||
rrm->rrc.trans_cnt++ ;
|
|
||||||
PUT_RRC_MSG(
|
|
||||||
msg_rrm_rb_establish_req(inst,
|
|
||||||
&Lchan_desc[QOS_DTCH_B],
|
|
||||||
&Mac_rlc_meas_desc[QOS_DTCH_B],
|
|
||||||
&src_dst[0] ,
|
|
||||||
rrm->rrc.trans_cnt,
|
|
||||||
rrm->L3_info,rrm->L3_info_t)
|
|
||||||
) ;
|
|
||||||
//fprintf(stderr,"item_trans in RRM_RB_ESTABLISH_REQ 3=%d node %d\n",rrm->rrc.trans_cnt,rrm->id);//dbg
|
|
||||||
add_item_transact( &(rrm->rrc.transaction), rrm->rrc.trans_cnt ,INT_RRC,RRM_RB_ESTABLISH_REQ,Trans_id,PARENT);
|
|
||||||
|
|
||||||
add_rb( &(rrm->rrc.pRbEntry), rrm->rrc.trans_cnt, QOS_DTCH_B, &src_dst[0] ) ;
|
|
||||||
|
|
||||||
pthread_mutex_unlock( &( rrm->rrc.exclu ) ) ;
|
|
||||||
|
|
||||||
rrm->state = CLUSTERHEAD_INIT1 ;
|
|
||||||
fprintf(stderr,"[RRM] CLUSTERHEAD_INIT1\n" );
|
|
||||||
ret = 0 ;
|
|
||||||
} else
|
|
||||||
fprintf(stderr,"[RRM] CMM_CX_SETUP_REQ (%d) is not allowed (Only CH):etat=%d\n", Trans_id, rrm->state);
|
|
||||||
}
|
|
||||||
|
|
||||||
return ret ;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief RRC response to rb_establish_req. RRC Acknowledgement of reception of
|
|
||||||
rrc_rb_establishment_req.
|
|
||||||
*/
|
|
||||||
void rrc_rb_establish_resp(
|
|
||||||
Instance_t inst , //!< Identification de l'instance
|
|
||||||
Transaction_t Trans_id //!< Transaction ID
|
|
||||||
)
|
|
||||||
{
|
|
||||||
rrm_t *rrm = &rrm_inst[inst] ;
|
|
||||||
|
|
||||||
if ( (rrm->state == CLUSTERHEAD)
|
|
||||||
|| (rrm->state == CLUSTERHEAD_INIT0)
|
|
||||||
|| (rrm->state == CLUSTERHEAD_INIT1)
|
|
||||||
) {
|
|
||||||
pthread_mutex_lock( &( rrm->rrc.exclu ) ) ;
|
|
||||||
set_ttl_transact(rrm->rrc.transaction, Trans_id, TTL_DEFAULT_VALUE ) ;
|
|
||||||
pthread_mutex_unlock( &( rrm->rrc.exclu ) ) ;
|
|
||||||
} else
|
|
||||||
fprintf(stderr,"[RRM] RRC_RB_ESTABLISH_RESP (%d) is not allowed (Only CH):etat=%d\n",Trans_id,rrm->state);
|
|
||||||
}
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief Liberation d'un radio bearer
|
|
||||||
*/
|
|
||||||
static void rb_release_req(
|
|
||||||
Instance_t inst , ///< Identification de l'instance
|
|
||||||
rrm_t *rrm , ///< pointeur sur l'instance du RRM
|
|
||||||
RB_ID Rb_id , ///< Id du RB a liberer
|
|
||||||
unsigned int parentTransact , ///< Transaction parent ( a l'origne de la requete )
|
|
||||||
unsigned int status_parent ///< Status du parent
|
|
||||||
)
|
|
||||||
{
|
|
||||||
rrm->rrc.trans_cnt++ ;
|
|
||||||
PUT_RRC_MSG( msg_rrm_rb_release_req(inst,Rb_id, rrm->rrc.trans_cnt) );
|
|
||||||
add_item_transact( &(rrm->rrc.transaction), rrm->rrc.trans_cnt, INT_RRC, RRM_RB_RELEASE_REQ, parentTransact,status_parent);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief RRC confirmation of rb_establish_req. RRC confirmation of
|
|
||||||
rrc_rb_establishment_req after transactions are complete.
|
|
||||||
Essentially for CH only (except SRB0/1)
|
|
||||||
*/
|
|
||||||
void rrc_rb_establish_cfm(
|
|
||||||
Instance_t inst , //!< Identification de l'instance
|
|
||||||
RB_ID Rb_id , //!< Radio Bearer ID used by RRC
|
|
||||||
RB_TYPE RB_type , //!< Radio Bearer Type
|
|
||||||
Transaction_t Trans_id //!< Transaction ID
|
|
||||||
)
|
|
||||||
{
|
|
||||||
rrm_t *rrm = &rrm_inst[inst] ;
|
|
||||||
|
|
||||||
if ( (rrm->state == CLUSTERHEAD)
|
|
||||||
|| (rrm->state == CLUSTERHEAD_INIT0)
|
|
||||||
|| (rrm->state == CLUSTERHEAD_INIT1)
|
|
||||||
) {
|
|
||||||
transact_t *pTransact ;
|
|
||||||
|
|
||||||
pthread_mutex_lock( &( rrm->rrc.exclu ) ) ;
|
|
||||||
pTransact = get_item_transact(rrm->rrc.transaction,Trans_id ) ;
|
|
||||||
|
|
||||||
if ( pTransact == NULL ) {
|
|
||||||
fprintf(stderr,"[RRM] rrc_rb_establish_cfm (%d) unknown transaction\n",Trans_id);
|
|
||||||
// comme la transaction est inconnue, on libere immediatement le
|
|
||||||
// tuyau nouvellement cree (au niveau du RRC uniquement)
|
|
||||||
rb_release_req( inst, rrm,Rb_id,0,NO_PARENT );
|
|
||||||
pthread_mutex_unlock( &( rrm->rrc.exclu ) ) ;
|
|
||||||
} else {
|
|
||||||
unsigned int parent_id = pTransact->parent_id ;
|
|
||||||
unsigned int status_parent = pTransact->parent_status ;
|
|
||||||
|
|
||||||
update_rb_desc(rrm->rrc.pRbEntry, Trans_id, Rb_id, RB_type );
|
|
||||||
del_item_transact( &(rrm->rrc.transaction),Trans_id ) ;
|
|
||||||
pthread_mutex_unlock( &( rrm->rrc.exclu ) ) ;
|
|
||||||
|
|
||||||
if ( status_parent ) {
|
|
||||||
transact_t *pTransactParent;
|
|
||||||
|
|
||||||
pthread_mutex_lock( &( rrm->cmm.exclu ) ) ;
|
|
||||||
pTransactParent = get_item_transact(rrm->cmm.transaction,parent_id ) ;
|
|
||||||
|
|
||||||
if ( pTransactParent != NULL ) {
|
|
||||||
PUT_CMM_MSG( msg_rrm_cx_setup_cnf(inst,Rb_id,pTransactParent->id ));
|
|
||||||
|
|
||||||
if ( rrm->state == CLUSTERHEAD_INIT1 )
|
|
||||||
rrm->state = CLUSTERHEAD ;
|
|
||||||
|
|
||||||
del_item_transact( &(rrm->cmm.transaction),pTransactParent->id ) ;
|
|
||||||
pthread_mutex_unlock( &( rrm->cmm.exclu ) ) ;
|
|
||||||
} else {
|
|
||||||
// comme la transaction parent est inconnue, on libere
|
|
||||||
// immediatement le tuyau nouvellement cree (au niveau
|
|
||||||
// du RRC uniquement)
|
|
||||||
pthread_mutex_unlock( &( rrm->cmm.exclu ) ) ;
|
|
||||||
|
|
||||||
pthread_mutex_lock( &( rrm->rrc.exclu ) ) ;
|
|
||||||
rb_release_req( inst, rrm,Rb_id, 0, NO_PARENT );
|
|
||||||
del_rb_by_rbid( &(rrm->rrc.pRbEntry), Rb_id ) ;
|
|
||||||
pthread_mutex_unlock( &( rrm->rrc.exclu ) );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
pthread_mutex_unlock( &( rrm->cmm.exclu ) ) ;
|
|
||||||
}
|
|
||||||
} else
|
|
||||||
fprintf(stderr,"[RRM] RRC_RB_ESTABLISH_CFM (%d) is not allowed (Only CH):etat=%d\n",Trans_id,rrm->state);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* =========================================================================
|
|
||||||
* MODICATION D'UN RADIO BEARER
|
|
||||||
* =========================================================================
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief CMM connection modify request. Only in CH.
|
|
||||||
|
|
||||||
*/
|
|
||||||
int cmm_cx_modify_req(
|
|
||||||
Instance_t inst , //!< Identification de l'instance
|
|
||||||
RB_ID Rb_id , //!< L2 Rb_id
|
|
||||||
QOS_CLASS_T QoS_class , //!< QOS class index
|
|
||||||
Transaction_t Trans_id //!< Transaction ID
|
|
||||||
)
|
|
||||||
{
|
|
||||||
int ret = -1 ;
|
|
||||||
rrm_t *rrm = &rrm_inst[inst] ;
|
|
||||||
|
|
||||||
if ( rrm->state == CLUSTERHEAD ) {
|
|
||||||
RB_desc_t *pRb ;
|
|
||||||
|
|
||||||
pthread_mutex_lock( &( rrm->cmm.exclu ) ) ;
|
|
||||||
add_item_transact( &(rrm->cmm.transaction), Trans_id,INT_CMM,CMM_CX_MODIFY_REQ,0,NO_PARENT);
|
|
||||||
pthread_mutex_unlock( &( rrm->cmm.exclu ) ) ;
|
|
||||||
|
|
||||||
/** \todo Evaluer si le RB peut etre modifier avant de solliciter le RRC */
|
|
||||||
pRb = (RB_desc_t *) get_rb_desc_by_rbid( rrm->rrc.pRbEntry, Rb_id ) ;
|
|
||||||
|
|
||||||
if ( pRb != NULL ) {
|
|
||||||
pthread_mutex_lock( &( rrm->rrc.exclu ) ) ;
|
|
||||||
rrm->rrc.trans_cnt++ ;
|
|
||||||
|
|
||||||
PUT_RRC_MSG(
|
|
||||||
msg_rrm_rb_modify_req( inst,
|
|
||||||
&Lchan_desc[QoS_class],
|
|
||||||
&Mac_rlc_meas_desc[QoS_class],
|
|
||||||
Rb_id,
|
|
||||||
rrm->rrc.trans_cnt)
|
|
||||||
) ;
|
|
||||||
|
|
||||||
add_item_transact( &(rrm->rrc.transaction), rrm->rrc.trans_cnt ,INT_RRC,RRM_RB_MODIFY_REQ,Trans_id,PARENT);
|
|
||||||
add_rb( &(rrm->rrc.pRbEntry), rrm->rrc.trans_cnt, QoS_class, &pRb->L2_id[0] ) ;
|
|
||||||
|
|
||||||
pRb->QoS_class = QoS_class ;
|
|
||||||
pthread_mutex_unlock( &( rrm->rrc.exclu ) ) ;
|
|
||||||
}
|
|
||||||
|
|
||||||
ret = 0 ;
|
|
||||||
} else
|
|
||||||
fprintf(stderr,"[RRM] CMM_CX_MODIFY_REQ (%d) is not allowed (Only CH):etat=%d\n",Trans_id,rrm->state);
|
|
||||||
|
|
||||||
return ret ;
|
|
||||||
}
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief RRC response to rb_modify_req
|
|
||||||
*/
|
|
||||||
void rrc_rb_modify_resp(
|
|
||||||
Instance_t inst , //!< Identification de l'instance
|
|
||||||
Transaction_t Trans_id //!< Transaction ID
|
|
||||||
)
|
|
||||||
{
|
|
||||||
rrm_t *rrm = &rrm_inst[inst] ;
|
|
||||||
|
|
||||||
if ( (rrm->state == CLUSTERHEAD)
|
|
||||||
|| (rrm->state == CLUSTERHEAD_INIT0)
|
|
||||||
|| (rrm->state == CLUSTERHEAD_INIT1)
|
|
||||||
) {
|
|
||||||
pthread_mutex_lock( &( rrm->rrc.exclu ) ) ;
|
|
||||||
set_ttl_transact(rrm->rrc.transaction,Trans_id, TTL_DEFAULT_VALUE) ;
|
|
||||||
pthread_mutex_unlock( &( rrm->rrc.exclu ) ) ;
|
|
||||||
} else
|
|
||||||
fprintf(stderr,"[RRM] RRC_RB_MODIFY_RESP (%d) is not allowed (Only CH):etat=%d\n",Trans_id,rrm->state);
|
|
||||||
}
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief RRC confirmation of rb_modify_req
|
|
||||||
*/
|
|
||||||
void rrc_rb_modify_cfm(
|
|
||||||
Instance_t inst , //!< Identification de l'instance
|
|
||||||
RB_ID Rb_id , //!< Radio Bearer ID used by RRC
|
|
||||||
Transaction_t Trans_id //!< Transaction ID
|
|
||||||
)
|
|
||||||
{
|
|
||||||
rrm_t *rrm = &rrm_inst[inst] ;
|
|
||||||
|
|
||||||
if ( rrm->state == CLUSTERHEAD ) {
|
|
||||||
transact_t *pTransact ;
|
|
||||||
pthread_mutex_lock( &( rrm->rrc.exclu ) ) ;
|
|
||||||
pTransact = get_item_transact(rrm->rrc.transaction,Trans_id ) ;
|
|
||||||
|
|
||||||
if ( pTransact == NULL ) {
|
|
||||||
fprintf(stderr,"[RRM] rrc_rb_modify_cfm (%d) unknown transaction\n",Trans_id);
|
|
||||||
pthread_mutex_unlock( &( rrm->rrc.exclu ) ) ;
|
|
||||||
} else {
|
|
||||||
unsigned int parent_id = pTransact->parent_id ;
|
|
||||||
unsigned int status_parent = pTransact->parent_status ;
|
|
||||||
|
|
||||||
RB_desc_t * pRb = (RB_desc_t *) get_rb_desc_by_rbid( rrm->rrc.pRbEntry, Rb_id ) ;
|
|
||||||
|
|
||||||
if ( pRb != NULL ) {
|
|
||||||
RB_TYPE RB_type = pRb->RB_type ;
|
|
||||||
// détruit l'ancienne description
|
|
||||||
del_rb_by_rbid( &(rrm->rrc.pRbEntry), Rb_id ) ;
|
|
||||||
// mise à jour de la nouvelle
|
|
||||||
update_rb_desc(rrm->rrc.pRbEntry, Trans_id, Rb_id, RB_type );
|
|
||||||
}
|
|
||||||
|
|
||||||
del_item_transact( &(rrm->rrc.transaction),Trans_id ) ;
|
|
||||||
pthread_mutex_unlock( &( rrm->rrc.exclu ) ) ;
|
|
||||||
|
|
||||||
pthread_mutex_lock( &( rrm->cmm.exclu ) ) ;
|
|
||||||
|
|
||||||
if ( status_parent ) {
|
|
||||||
transact_t *pTransactParent = get_item_transact(rrm->cmm.transaction,parent_id ) ;
|
|
||||||
|
|
||||||
if ( pTransactParent != NULL ) {
|
|
||||||
PUT_CMM_MSG( msg_rrm_cx_modify_cnf(inst,pTransactParent->id ));
|
|
||||||
del_item_transact( &(rrm->cmm.transaction),pTransactParent->id ) ;
|
|
||||||
} else // la transaction parent est inconnue, on ne fait rien
|
|
||||||
fprintf(stderr, "[RRM] RRC_RB_MODIFY_CFM (%d) : the parent transaction (%d) is unknown\n",Trans_id,parent_id);
|
|
||||||
}
|
|
||||||
|
|
||||||
pthread_mutex_unlock( &( rrm->cmm.exclu ) ) ;
|
|
||||||
}
|
|
||||||
} else
|
|
||||||
fprintf(stderr,"[RRM] RRC_RB_MODIFY_CFM (%d) is not allowed (Only CH):etat=%d\n",Trans_id,rrm->state);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* =========================================================================
|
|
||||||
* LIBERATION D'UN RADIO BEARER
|
|
||||||
* =========================================================================
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief CMM connection release request. Only in CH.
|
|
||||||
*/
|
|
||||||
int cmm_cx_release_req(
|
|
||||||
Instance_t inst , //!< Identification de l'instance
|
|
||||||
RB_ID Rb_id , //!< L2 Rb_id
|
|
||||||
Transaction_t Trans_id //!< Transaction ID
|
|
||||||
)
|
|
||||||
{
|
|
||||||
int ret = -1 ;
|
|
||||||
rrm_t *rrm = &rrm_inst[inst] ;
|
|
||||||
|
|
||||||
if ( rrm->state == CLUSTERHEAD ) {
|
|
||||||
pthread_mutex_lock( &( rrm->cmm.exclu ) ) ;
|
|
||||||
add_item_transact( &(rrm->cmm.transaction), Trans_id,INT_CMM,CMM_CX_RELEASE_REQ,0,NO_PARENT);
|
|
||||||
pthread_mutex_unlock( &( rrm->cmm.exclu ) ) ;
|
|
||||||
|
|
||||||
pthread_mutex_lock( &( rrm->rrc.exclu ) ) ;
|
|
||||||
rb_release_req( inst, rrm,Rb_id,Trans_id, PARENT );
|
|
||||||
del_rb_by_rbid( &(rrm->rrc.pRbEntry), Rb_id ) ;
|
|
||||||
pthread_mutex_unlock( &( rrm->rrc.exclu ) ) ;
|
|
||||||
|
|
||||||
ret = 0 ;
|
|
||||||
} else
|
|
||||||
fprintf(stderr,"[RRM] CMM_CX_RELEASE_REQ (%d) is not allowed (Only CH):etat=%d\n",Trans_id,rrm->state);
|
|
||||||
|
|
||||||
return ret ;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief RRC response to rb_release_req
|
|
||||||
*/
|
|
||||||
void rrc_rb_release_resp(
|
|
||||||
Instance_t inst , //!< Identification de l'instance
|
|
||||||
Transaction_t Trans_id //!< Transaction ID
|
|
||||||
)
|
|
||||||
{
|
|
||||||
rrm_t *rrm = &rrm_inst[inst] ;
|
|
||||||
|
|
||||||
if ( rrm->state == CLUSTERHEAD ) {
|
|
||||||
transact_t *pTransact ;
|
|
||||||
|
|
||||||
pthread_mutex_lock( &( rrm->rrc.exclu ) ) ;
|
|
||||||
pTransact = get_item_transact(rrm->rrc.transaction,Trans_id ) ;
|
|
||||||
|
|
||||||
if ( pTransact == NULL ) {
|
|
||||||
fprintf(stderr,"[RRM] rrc_rb_release_resp (%d) unknown transaction\n",Trans_id);
|
|
||||||
pthread_mutex_unlock( &( rrm->rrc.exclu ) ) ;
|
|
||||||
} else {
|
|
||||||
unsigned int parent_id = pTransact->parent_id ;
|
|
||||||
unsigned int status_parent = pTransact->parent_status ;
|
|
||||||
|
|
||||||
del_item_transact( &(rrm->rrc.transaction),Trans_id ) ;
|
|
||||||
pthread_mutex_unlock( &( rrm->rrc.exclu ) ) ;
|
|
||||||
|
|
||||||
pthread_mutex_lock( &( rrm->cmm.exclu ) ) ;
|
|
||||||
|
|
||||||
if ( status_parent ) {
|
|
||||||
transact_t *pTransactParent = get_item_transact(rrm->cmm.transaction,parent_id ) ;
|
|
||||||
|
|
||||||
if ( pTransactParent != NULL ) {
|
|
||||||
PUT_CMM_MSG( msg_rrm_cx_release_cnf(inst,pTransactParent->id ) );
|
|
||||||
del_item_transact( &(rrm->cmm.transaction),pTransactParent->id ) ;
|
|
||||||
} else // la transaction parent est inconnue, on ne fait rien
|
|
||||||
fprintf(stderr,"[RRM] RRC_RB_RELEASE_RESP (%d) : the parent transaction (%d) is unknown\n",Trans_id,parent_id);
|
|
||||||
}
|
|
||||||
|
|
||||||
pthread_mutex_unlock( &( rrm->cmm.exclu ) ) ;
|
|
||||||
}
|
|
||||||
} else
|
|
||||||
fprintf(stderr,"[RRM] RRC_RB_RELEASE_RESP (%d) is not allowed (Only CH):etat=%d\n",Trans_id,rrm->state);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* =========================================================================
|
|
||||||
* MESURES SUR UN RADIO BEARER
|
|
||||||
* =========================================================================
|
|
||||||
*/
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief RRC measurement indication
|
|
||||||
*/
|
|
||||||
void rrc_rb_meas_ind(
|
|
||||||
Instance_t inst , //!< Identification de l'instance
|
|
||||||
RB_ID Rb_id , //!< Radio Bearer ID
|
|
||||||
L2_ID L2_id , //!< Layer 2 (MAC) IDs for link
|
|
||||||
MEAS_MODE Meas_mode , //!< Measurement mode (periodic or event-driven)
|
|
||||||
MAC_RLC_MEAS_T Mac_rlc_meas , //!< MAC/RLC measurements
|
|
||||||
Transaction_t Trans_id //!< Transaction ID
|
|
||||||
)
|
|
||||||
{
|
|
||||||
rrm_t *rrm = &rrm_inst[inst] ;
|
|
||||||
|
|
||||||
if ( rrm->state == CLUSTERHEAD ) {
|
|
||||||
PUT_RRC_MSG( msg_rrm_rb_meas_resp(inst,Trans_id) );
|
|
||||||
|
|
||||||
if ( Meas_mode == PERIODIC ) {
|
|
||||||
RB_desc_t *pRb ;
|
|
||||||
int ii_rb = 1 ;
|
|
||||||
int transaction_link_info ;
|
|
||||||
|
|
||||||
// update database of RB
|
|
||||||
pthread_mutex_lock( &( rrm->rrc.exclu ) ) ;
|
|
||||||
update_rb_meas( rrm->rrc.pRbEntry, Rb_id, &L2_id, &Mac_rlc_meas );
|
|
||||||
pthread_mutex_unlock( &( rrm->rrc.exclu ) ) ;
|
|
||||||
|
|
||||||
pthread_mutex_lock( &( rrm->pusu.exclu ) ) ;
|
|
||||||
rrm->pusu.trans_cnt++ ;
|
|
||||||
transaction_link_info = rrm->pusu.trans_cnt ;
|
|
||||||
add_item_transact( &(rrm->pusu.transaction), transaction_link_info,INT_PUSU,RRM_LINK_INFO_IND,0,NO_PARENT);
|
|
||||||
pthread_mutex_unlock( &( rrm->pusu.exclu ) ) ;
|
|
||||||
|
|
||||||
pRb = get_rb_desc_by_rbid( rrm->rrc.pRbEntry, Rb_id ) ;
|
|
||||||
|
|
||||||
if ( memcmp(&L2_id, &pRb->L2_id[1], sizeof(L2_ID ) ) == 0 )
|
|
||||||
ii_rb=0 ;
|
|
||||||
|
|
||||||
PUT_PUSU_MSG(
|
|
||||||
msg_rrm_link_info_ind(inst, L2_id , pRb->L2_id[ii_rb] , Rb_id,
|
|
||||||
Mac_rlc_meas.Rssi ,Mac_rlc_meas.Spec_eff, transaction_link_info )
|
|
||||||
);
|
|
||||||
}
|
|
||||||
} else
|
|
||||||
fprintf(stderr,"[RRM] RRC_RB_MEAS_IND (%d) is not allowed (Only CH):etat=%d\n",Trans_id,rrm->state);
|
|
||||||
}
|
|
||||||
@@ -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 rb_mngt.h
|
|
||||||
|
|
||||||
\brief Fichier d'entete contenant les declarations des types, des defines ,
|
|
||||||
et des fonctions relatives a la gestion des radio bearers par
|
|
||||||
le cluster head.
|
|
||||||
|
|
||||||
\author BURLOT Pascal
|
|
||||||
|
|
||||||
\date 29/08/08
|
|
||||||
|
|
||||||
|
|
||||||
\par Historique:
|
|
||||||
$Author$ $Date$ $Revision$
|
|
||||||
$Id$
|
|
||||||
$Log$
|
|
||||||
|
|
||||||
*******************************************************************************
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef RB_MNGT_H
|
|
||||||
#define RB_MNGT_H
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif /* RB_MNGT_H */
|
|
||||||
@@ -1,724 +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 rrc_2_rrm_msg.c
|
|
||||||
|
|
||||||
\brief Fonctions permettant le formattage des donnees pour l'envoi d'un
|
|
||||||
message sur le socket entre le RRC et le RRM
|
|
||||||
|
|
||||||
\author BURLOT Pascal
|
|
||||||
|
|
||||||
\date 16/07/08
|
|
||||||
|
|
||||||
|
|
||||||
\par Historique:
|
|
||||||
P.BURLOT 2009-01-20
|
|
||||||
Correction de bug (debordement memoire) remplacement de la macro
|
|
||||||
RRM_CALLOC() par RRM_CALLOC2() dans la fonction msg_rrc_sensing_meas_ind()
|
|
||||||
L. IACOBELLI 2010-01-05
|
|
||||||
+ new messages for sensing
|
|
||||||
|
|
||||||
*******************************************************************************
|
|
||||||
*/
|
|
||||||
#ifdef RRC_EMUL
|
|
||||||
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <sys/socket.h>
|
|
||||||
#include <sys/un.h>
|
|
||||||
#include "L3_rrc_defs.h"
|
|
||||||
#include "rrm_sock.h"
|
|
||||||
#include "L3_rrc_interface.h"
|
|
||||||
#include "rrc_rrm_msg.h"
|
|
||||||
#include "rrm_util.h"
|
|
||||||
//#include "sensing_rrm_msg.h" //mod_lor_10_04_15
|
|
||||||
|
|
||||||
#else
|
|
||||||
|
|
||||||
#include "defs.h"
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef TRACE
|
|
||||||
//! Macro creant la chaine a partir du nom de la variable
|
|
||||||
#define STRINGIZER(x) #x
|
|
||||||
//! Tableau pour le mode trace faisant la translation entre le numero et le nom du message
|
|
||||||
const char *Str_msg_rrc_rrm[NB_MSG_RRC_RRM] = {
|
|
||||||
STRINGIZER(RRM_RB_ESTABLISH_REQ ),
|
|
||||||
STRINGIZER(RRC_RB_ESTABLISH_RESP ),
|
|
||||||
STRINGIZER(RRC_RB_ESTABLISH_CFM ),
|
|
||||||
STRINGIZER(RRM_RB_MODIFY_REQ ),
|
|
||||||
STRINGIZER(RRC_RB_MODIFY_RESP ),
|
|
||||||
STRINGIZER(RRC_RB_MODIFY_CFM ),
|
|
||||||
STRINGIZER(RRM_RB_RELEASE_REQ ),
|
|
||||||
STRINGIZER(RRC_RB_RELEASE_RESP ),
|
|
||||||
STRINGIZER(RRC_MR_ATTACH_IND ),
|
|
||||||
STRINGIZER(RRM_SENSING_MEAS_REQ ),
|
|
||||||
STRINGIZER(RRC_SENSING_MEAS_RESP ),
|
|
||||||
STRINGIZER(RRC_CX_ESTABLISH_IND ),
|
|
||||||
STRINGIZER(RRC_PHY_SYNCH_TO_MR_IND ),
|
|
||||||
STRINGIZER(RRC_PHY_SYNCH_TO_CH_IND ),
|
|
||||||
STRINGIZER(RRCI_CX_ESTABLISH_RESP ),
|
|
||||||
STRINGIZER(RRC_SENSING_MEAS_IND ),
|
|
||||||
STRINGIZER(RRM_SENSING_MEAS_RESP ),
|
|
||||||
STRINGIZER(RRC_RB_MEAS_IND ),
|
|
||||||
STRINGIZER(RRM_RB_MEAS_RESP ),
|
|
||||||
STRINGIZER(RRM_INIT_CH_REQ ),
|
|
||||||
STRINGIZER(RRCI_INIT_MR_REQ ),
|
|
||||||
STRINGIZER(RRC_UPDATE_SENS ),
|
|
||||||
STRINGIZER(RRM_INIT_MON_REQ ),
|
|
||||||
STRINGIZER(RRM_INIT_SCAN_REQ ),
|
|
||||||
STRINGIZER(RRC_INIT_SCAN_REQ ),
|
|
||||||
STRINGIZER(RRM_SCAN_ORD ),
|
|
||||||
// STRINGIZER(UPDATE_SENS_RESULTS_3 ), //mod_lor_10_01_25
|
|
||||||
STRINGIZER(RRM_END_SCAN_REQ ),
|
|
||||||
STRINGIZER(RRC_END_SCAN_REQ ),
|
|
||||||
STRINGIZER(RRC_END_SCAN_CONF ),
|
|
||||||
// STRINGIZER(OPEN_FREQ_QUERY_4 ),
|
|
||||||
// STRINGIZER(UPDATE_OPEN_FREQ_7 ),
|
|
||||||
// STRINGIZER(UPDATE_SN_OCC_FREQ_5 ),
|
|
||||||
STRINGIZER(RRM_UP_FREQ_ASS ),
|
|
||||||
STRINGIZER(RRM_END_SCAN_CONF ),
|
|
||||||
STRINGIZER(RRC_UP_FREQ_ASS ),//add_lor_10_11_05
|
|
||||||
STRINGIZER(RRM_UP_FREQ_ASS_SEC ),//add_lor_10_11_05
|
|
||||||
STRINGIZER(RRC_UP_FREQ_ASS_SEC )/*,//add_lor_10_11_05
|
|
||||||
STRINGIZER(RRC_OPEN_FREQ ),
|
|
||||||
STRINGIZER(RRM_OPEN_FREQ ),
|
|
||||||
STRINGIZER(RRM_UPDATE_SN_FREQ ),
|
|
||||||
STRINGIZER(RRC_UPDATE_SN_FREQ ),
|
|
||||||
STRINGIZER(RRM_CLUST_SCAN_REQ ),
|
|
||||||
STRINGIZER(RRC_CLUST_SCAN_REQ ),
|
|
||||||
STRINGIZER(RRM_CLUST_SCAN_CONF ),
|
|
||||||
STRINGIZER(RRM_CLUST_MON_REQ ),
|
|
||||||
STRINGIZER(RRC_CLUST_MON_REQ ),
|
|
||||||
STRINGIZER(RRM_CLUST_MON_CONF ),
|
|
||||||
STRINGIZER(RRM_END_SCAN_CONF ),
|
|
||||||
STRINGIZER(RRM_INIT_CONN_REQ ),
|
|
||||||
STRINGIZER(RRC_INIT_CONN_CONF ),
|
|
||||||
STRINGIZER(RRM_FREQ_ALL_PROP ),
|
|
||||||
STRINGIZER(RRC_FREQ_ALL_PROP_CONF ),
|
|
||||||
STRINGIZER(RRM_REP_FREQ_ALL ),
|
|
||||||
STRINGIZER(RRC_REP_FREQ_ACK ),
|
|
||||||
STRINGIZER(RRC_INIT_CONN_REQ ),
|
|
||||||
STRINGIZER(RRM_CONN_SET ),
|
|
||||||
STRINGIZER(RRC_FREQ_ALL_PROP ),
|
|
||||||
STRINGIZER(RRM_FREQ_ALL_PROP_CONF ),
|
|
||||||
STRINGIZER(RRC_REP_FREQ_ALL ),
|
|
||||||
STRINGIZER(RRM_REP_FREQ_ACK ) */
|
|
||||||
|
|
||||||
} ;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief This function initialize the message header
|
|
||||||
\return any return value
|
|
||||||
*/
|
|
||||||
static void init_rrc_msg_head(
|
|
||||||
msg_head_t *msg_head , //!< message header to initialize
|
|
||||||
Instance_t inst , //!< Instance ID
|
|
||||||
MSG_RRC_RRM_T msg_type , //!< type of message to initialize
|
|
||||||
unsigned int size , //!< size of message
|
|
||||||
Transaction_t Trans_id //!< transaction id associated to this message
|
|
||||||
)
|
|
||||||
{
|
|
||||||
if ( msg_head != NULL ) {
|
|
||||||
msg_head->start = START_MSG ;
|
|
||||||
msg_head->msg_type = 0xFF & msg_type ;
|
|
||||||
msg_head->inst = inst ;
|
|
||||||
msg_head->Trans_id = Trans_id ;
|
|
||||||
msg_head->size = size;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief La fonction formate en un message generique de reponse pour les
|
|
||||||
fonctions :
|
|
||||||
- rrc_rb_establish_resp(),rrc_rb_modify_resp(),rrc_rb_modify_resp(),
|
|
||||||
- rrc_rb_release_resp() et rrc_sensing_meas_resp() .
|
|
||||||
\return message formate
|
|
||||||
*/
|
|
||||||
static msg_t *msg_rrc_generic_resp(
|
|
||||||
Instance_t inst , //!< Instance ID
|
|
||||||
MSG_RRC_RRM_T msg_type , //!< type of message
|
|
||||||
Transaction_t Trans_id //!< Transaction ID
|
|
||||||
)
|
|
||||||
{
|
|
||||||
|
|
||||||
msg_t *msg = RRM_CALLOC(msg_t , 1 ) ;
|
|
||||||
|
|
||||||
if ( msg != NULL ) {
|
|
||||||
init_rrc_msg_head(&(msg->head),inst, msg_type, 0 , Trans_id);
|
|
||||||
msg->data = NULL ;
|
|
||||||
}
|
|
||||||
|
|
||||||
return msg ;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief La fonction formate en un message les parametres de la fonction
|
|
||||||
rrc_rb_establish_resp().
|
|
||||||
\return message formate
|
|
||||||
*/
|
|
||||||
msg_t *msg_rrc_rb_establish_resp(
|
|
||||||
Instance_t inst , //!< Instance ID
|
|
||||||
Transaction_t Trans_id //!< Transaction ID
|
|
||||||
)
|
|
||||||
{
|
|
||||||
return msg_rrc_generic_resp( inst, RRC_RB_ESTABLISH_RESP, Trans_id) ;
|
|
||||||
}
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief La fonction formate en un message les parametres de la fonction
|
|
||||||
rrc_rb_establish_cfm().
|
|
||||||
\return message formate
|
|
||||||
*/
|
|
||||||
msg_t *msg_rrc_rb_establish_cfm(
|
|
||||||
Instance_t inst , //!< Instance ID
|
|
||||||
RB_ID Rb_id , //!< Radio Bearer ID used by RRC
|
|
||||||
RB_TYPE RB_type , //!< Radio Bearer Type
|
|
||||||
Transaction_t Trans_id //!< Transaction ID
|
|
||||||
)
|
|
||||||
{
|
|
||||||
msg_t *msg = RRM_CALLOC(msg_t , 1 ) ;
|
|
||||||
|
|
||||||
if ( msg != NULL ) {
|
|
||||||
rrc_rb_establish_cfm_t *p = RRM_CALLOC(rrc_rb_establish_cfm_t , 1 ) ;
|
|
||||||
|
|
||||||
if ( p != NULL ) {
|
|
||||||
init_rrc_msg_head(&(msg->head),inst,RRC_RB_ESTABLISH_CFM, sizeof( rrc_rb_establish_cfm_t ) ,Trans_id);
|
|
||||||
|
|
||||||
|
|
||||||
p->Rb_id = Rb_id ;
|
|
||||||
p->RB_type = RB_type ;
|
|
||||||
}
|
|
||||||
|
|
||||||
msg->data = (char *) p ;
|
|
||||||
}
|
|
||||||
|
|
||||||
return msg ;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief La fonction formate en un message les parametres de la fonction
|
|
||||||
rrc_rb_modify_resp().
|
|
||||||
\return message formate
|
|
||||||
*/
|
|
||||||
msg_t *msg_rrc_rb_modify_resp(
|
|
||||||
Instance_t inst , //!< Instance ID
|
|
||||||
Transaction_t Trans_id //!< Transaction ID
|
|
||||||
)
|
|
||||||
{
|
|
||||||
return msg_rrc_generic_resp( inst,RRC_RB_MODIFY_RESP, Trans_id) ;
|
|
||||||
}
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief La fonction formate en un message les parametres de la fonction
|
|
||||||
rrc_rb_modify_cfm().
|
|
||||||
\return message formate
|
|
||||||
*/
|
|
||||||
msg_t *msg_rrc_rb_modify_cfm(
|
|
||||||
Instance_t inst , //!< Instance ID
|
|
||||||
RB_ID Rb_id , //!< Radio Bearer ID used by RRC
|
|
||||||
Transaction_t Trans_id //!< Transaction ID
|
|
||||||
)
|
|
||||||
{
|
|
||||||
msg_t *msg = RRM_CALLOC(msg_t , 1 ) ;
|
|
||||||
|
|
||||||
if ( msg != NULL ) {
|
|
||||||
rrc_rb_modify_cfm_t *p = RRM_CALLOC(rrc_rb_modify_cfm_t , 1 ) ;
|
|
||||||
|
|
||||||
if ( p != NULL ) {
|
|
||||||
init_rrc_msg_head(&(msg->head),inst,RRC_RB_MODIFY_CFM, sizeof( rrc_rb_modify_cfm_t ) ,Trans_id);
|
|
||||||
|
|
||||||
|
|
||||||
p->Rb_id = Rb_id ;
|
|
||||||
}
|
|
||||||
|
|
||||||
msg->data = (char *) p ;
|
|
||||||
}
|
|
||||||
|
|
||||||
return msg ;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief La fonction formate en un message les parametres de la fonction
|
|
||||||
rrc_rb_release_resp().
|
|
||||||
\return message formate
|
|
||||||
*/
|
|
||||||
msg_t *msg_rrc_rb_release_resp(
|
|
||||||
Instance_t inst , //!< Instance ID
|
|
||||||
Transaction_t Trans_id //!< Transaction ID
|
|
||||||
)
|
|
||||||
{
|
|
||||||
return msg_rrc_generic_resp( inst,RRC_RB_RELEASE_RESP, Trans_id) ;
|
|
||||||
}
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief La fonction formate en un message les parametres de la fonction
|
|
||||||
rrc_MR_attach_ind().
|
|
||||||
\return message formate
|
|
||||||
*/
|
|
||||||
msg_t * msg_rrc_MR_attach_ind(
|
|
||||||
Instance_t inst , //!< Instance ID
|
|
||||||
L2_ID L2_id
|
|
||||||
)
|
|
||||||
{
|
|
||||||
msg_t *msg = RRM_CALLOC(msg_t , 1 ) ;
|
|
||||||
|
|
||||||
if ( msg != NULL ) {
|
|
||||||
rrc_MR_attach_ind_t *p = RRM_CALLOC(rrc_MR_attach_ind_t , 1 ) ;
|
|
||||||
|
|
||||||
if ( p != NULL ) {
|
|
||||||
init_rrc_msg_head(&(msg->head),inst,RRC_MR_ATTACH_IND, sizeof( rrc_MR_attach_ind_t ) ,0);
|
|
||||||
|
|
||||||
memcpy( p->L2_id.L2_id, L2_id.L2_id, sizeof(L2_ID) ) ;
|
|
||||||
}
|
|
||||||
|
|
||||||
msg->data = (char *) p ;
|
|
||||||
}
|
|
||||||
|
|
||||||
return msg ;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief La fonction formate en un message les parametres de la fonction
|
|
||||||
rrc_sensing_meas_resp().
|
|
||||||
\return message formate
|
|
||||||
*/
|
|
||||||
msg_t *msg_rrc_sensing_meas_resp(
|
|
||||||
Instance_t inst , //!< Instance ID
|
|
||||||
Transaction_t Trans_id //!< Transaction ID
|
|
||||||
)
|
|
||||||
{
|
|
||||||
return msg_rrc_generic_resp( inst,RRC_SENSING_MEAS_RESP, Trans_id) ;
|
|
||||||
}
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief La fonction formate en un message les parametres de la fonction
|
|
||||||
rrc_cx_establish_ind().
|
|
||||||
\return message formate
|
|
||||||
*/
|
|
||||||
msg_t * msg_rrc_cx_establish_ind(
|
|
||||||
Instance_t inst , //!< Instance ID
|
|
||||||
L2_ID L2_id , //!< Layer 2 (MAC) ID
|
|
||||||
Transaction_t Trans_id , //!< Transaction ID
|
|
||||||
unsigned char *L3_info , //!< Optional L3 Information
|
|
||||||
L3_INFO_T L3_info_t , //!< Type of L3 Information
|
|
||||||
RB_ID DTCH_B_id , //!< RBID of broadcast IP service (MR only)
|
|
||||||
RB_ID DTCH_id //!< RBID of default IP service (MR only)
|
|
||||||
)
|
|
||||||
{
|
|
||||||
msg_t *msg = RRM_CALLOC(msg_t , 1 ) ;
|
|
||||||
|
|
||||||
if ( msg != NULL ) {
|
|
||||||
rrc_cx_establish_ind_t *p = RRM_CALLOC(rrc_cx_establish_ind_t , 1 ) ;
|
|
||||||
|
|
||||||
if ( p != NULL ) {
|
|
||||||
init_rrc_msg_head(&(msg->head),inst,RRC_CX_ESTABLISH_IND, sizeof( rrc_cx_establish_ind_t ) ,Trans_id);
|
|
||||||
|
|
||||||
|
|
||||||
memcpy( p->L2_id.L2_id, L2_id.L2_id, sizeof(L2_ID) ) ;
|
|
||||||
|
|
||||||
p->DTCH_B_id = DTCH_B_id ;
|
|
||||||
p->DTCH_id = DTCH_id ;
|
|
||||||
|
|
||||||
p->L3_info_t = L3_info_t ;
|
|
||||||
|
|
||||||
if ( L3_info_t == IPv4_ADDR )
|
|
||||||
memcpy( p->L3_info, L3_info, 4 );
|
|
||||||
else if ( L3_info_t == IPv6_ADDR )
|
|
||||||
memcpy( p->L3_info, L3_info, 16 );
|
|
||||||
}
|
|
||||||
|
|
||||||
msg->data = (char *) p ;
|
|
||||||
}
|
|
||||||
|
|
||||||
return msg ;
|
|
||||||
|
|
||||||
}
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief La fonction formate en un message les parametres de la fonction
|
|
||||||
rrc_phy_synch_to_MR_ind().
|
|
||||||
\return message formate
|
|
||||||
*/
|
|
||||||
msg_t * msg_rrc_phy_synch_to_MR_ind(
|
|
||||||
Instance_t inst , //!< Instance ID
|
|
||||||
L2_ID L2_id
|
|
||||||
)
|
|
||||||
{
|
|
||||||
|
|
||||||
msg_t *smsg = RRM_CALLOC(msg_t , 1 ) ;
|
|
||||||
|
|
||||||
if ( smsg != NULL ) {
|
|
||||||
rrc_phy_synch_to_MR_ind_t *p = RRM_CALLOC(rrc_phy_synch_to_MR_ind_t , 1) ;
|
|
||||||
|
|
||||||
if ( p != NULL ) {
|
|
||||||
init_rrc_msg_head(&(smsg->head),inst,RRC_PHY_SYNCH_TO_MR_IND, sizeof( rrc_phy_synch_to_MR_ind_t ) ,0);
|
|
||||||
memcpy(&p->L2_id,(L2_ID*)&L2_id,sizeof(L2_ID));
|
|
||||||
}
|
|
||||||
|
|
||||||
smsg->data = (char *)p ;
|
|
||||||
msg("[msg_rrc_phy_synch_to_MR_ind] from Inst :%d\n",smsg->head.inst);
|
|
||||||
}
|
|
||||||
|
|
||||||
return smsg ;
|
|
||||||
}
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief La fonction formate en un message les parametres de la fonction
|
|
||||||
rrc_phy_synch_to_CH_ind().
|
|
||||||
\return message formate
|
|
||||||
*/
|
|
||||||
msg_t * msg_rrc_phy_synch_to_CH_ind(
|
|
||||||
Instance_t inst , //!< Instance ID
|
|
||||||
unsigned int Ch_index , //!< Clusterhead index
|
|
||||||
L2_ID L2_id
|
|
||||||
)
|
|
||||||
{
|
|
||||||
msg_t *smsg = RRM_CALLOC(msg_t , 1 ) ;
|
|
||||||
|
|
||||||
if ( smsg != NULL ) {
|
|
||||||
rrc_phy_synch_to_CH_ind_t *p = RRM_CALLOC(rrc_phy_synch_to_CH_ind_t , 1) ;
|
|
||||||
|
|
||||||
if ( p != NULL ) {
|
|
||||||
init_rrc_msg_head(&(smsg->head),inst, RRC_PHY_SYNCH_TO_CH_IND, sizeof( rrc_phy_synch_to_CH_ind_t ) ,0);
|
|
||||||
|
|
||||||
p->Ch_index = Ch_index ;
|
|
||||||
memcpy(&p->L2_id,(L2_ID*)&L2_id,sizeof(L2_ID));
|
|
||||||
}
|
|
||||||
|
|
||||||
smsg->data = (char *) p ;
|
|
||||||
msg("[msg_rrc_phy_synch_to_CH_ind] from Inst :%d\n",smsg->head.inst);
|
|
||||||
}
|
|
||||||
|
|
||||||
return smsg ;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief La fonction formate en un message les parametres de la fonction
|
|
||||||
rrc_sensing_meas_ind().
|
|
||||||
\return message formate
|
|
||||||
*/
|
|
||||||
msg_t * msg_rrc_sensing_meas_ind(
|
|
||||||
Instance_t inst , //!< Instance ID
|
|
||||||
L2_ID L2_id , //!< Layer 2 ID (MAC) of sensing node
|
|
||||||
unsigned int NB_meas , //!< Layer 2 ID (MAC) of sensing node
|
|
||||||
SENSING_MEAS_T *Sensing_meas , //!< Sensing Information
|
|
||||||
Transaction_t Trans_id //!< Transaction ID
|
|
||||||
)
|
|
||||||
{
|
|
||||||
|
|
||||||
msg_t *msg = RRM_CALLOC(msg_t , 1 ) ;
|
|
||||||
|
|
||||||
if ( msg != NULL ) {
|
|
||||||
unsigned int size = sizeof( rrc_sensing_meas_ind_t ) + (NB_meas-1) * sizeof(SENSING_MEAS_T) ;
|
|
||||||
// Note : (NB_meas-1) car la première est incorporé dans rrc_sensing_meas_ind_t
|
|
||||||
rrc_sensing_meas_ind_t *p = RRM_CALLOC2(rrc_sensing_meas_ind_t,size ) ;
|
|
||||||
|
|
||||||
if ( p != NULL ) {
|
|
||||||
init_rrc_msg_head(&(msg->head),inst, RRC_SENSING_MEAS_IND, size ,Trans_id);
|
|
||||||
|
|
||||||
|
|
||||||
memcpy( p->L2_id.L2_id, L2_id.L2_id, sizeof(L2_ID) ) ;
|
|
||||||
|
|
||||||
if ( NB_meas > 0 ) {
|
|
||||||
memcpy( p->Sensing_meas , Sensing_meas, NB_meas * sizeof(SENSING_MEAS_T) ) ;
|
|
||||||
}
|
|
||||||
|
|
||||||
p->NB_meas = NB_meas ;
|
|
||||||
}
|
|
||||||
|
|
||||||
msg->data = (char *) p ;
|
|
||||||
}
|
|
||||||
|
|
||||||
return msg ;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief La fonction formate en un message les parametres de la fonction
|
|
||||||
rrc_rb_meas_ind().
|
|
||||||
\return message formate
|
|
||||||
*/
|
|
||||||
msg_t * msg_rrc_rb_meas_ind(
|
|
||||||
Instance_t inst , //!< Instance ID
|
|
||||||
RB_ID Rb_id , //!< Radio Bearer ID
|
|
||||||
L2_ID L2_id , //!< Layer 2 (MAC) IDs for link
|
|
||||||
MEAS_MODE Meas_mode , //!< Measurement mode (periodic or event-driven)
|
|
||||||
MAC_RLC_MEAS_T *Mac_rlc_meas , //!< MAC/RLC measurements
|
|
||||||
Transaction_t Trans_id //!< Transaction ID
|
|
||||||
)
|
|
||||||
{
|
|
||||||
msg_t *msg = RRM_CALLOC(msg_t , 1 ) ;
|
|
||||||
|
|
||||||
if ( msg != NULL ) {
|
|
||||||
rrc_rb_meas_ind_t *p = RRM_CALLOC(rrc_rb_meas_ind_t , 1 ) ;
|
|
||||||
|
|
||||||
if ( p != NULL ) {
|
|
||||||
init_rrc_msg_head(&(msg->head),inst, RRC_RB_MEAS_IND, sizeof( rrc_rb_meas_ind_t ) ,Trans_id);
|
|
||||||
|
|
||||||
|
|
||||||
memcpy( p->L2_id.L2_id, L2_id.L2_id, sizeof(L2_ID) ) ;
|
|
||||||
memcpy( &(p->Mac_rlc_meas), Mac_rlc_meas, sizeof(L2_ID) ) ;
|
|
||||||
|
|
||||||
p->Rb_id = Rb_id ;
|
|
||||||
p->Meas_mode = Meas_mode ;
|
|
||||||
}
|
|
||||||
|
|
||||||
msg->data = (char *) p ;
|
|
||||||
}
|
|
||||||
|
|
||||||
return msg ;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief La fonction formate en un message les parametres de la fonction
|
|
||||||
rrc_update_sens().
|
|
||||||
\return message formate
|
|
||||||
*/
|
|
||||||
|
|
||||||
msg_t *msg_rrc_update_sens(
|
|
||||||
Instance_t inst,
|
|
||||||
//double info_time , //!< Date of the message
|
|
||||||
L2_ID L2_id,
|
|
||||||
unsigned int NB_info,
|
|
||||||
Sens_ch_t *Sens_meas,
|
|
||||||
Transaction_t Trans_id
|
|
||||||
)
|
|
||||||
{
|
|
||||||
msg_t *msg = RRM_CALLOC(msg_t , 1 ) ;
|
|
||||||
|
|
||||||
if ( msg != NULL ) {
|
|
||||||
unsigned int size = sizeof( rrc_update_sens_t );// + (NB_info-1) * sizeof(Sens_ch_t) ;//mod_lor_10_04_23
|
|
||||||
|
|
||||||
rrc_update_sens_t *p = RRM_CALLOC2(rrc_update_sens_t , size ) ;
|
|
||||||
|
|
||||||
if ( p != NULL ) {
|
|
||||||
//fprintf(stdout,"msg_rrc_update_sens() time : %d\n", NB_info); //dbg
|
|
||||||
init_rrc_msg_head(&(msg->head),inst, RRC_UPDATE_SENS, size ,Trans_id);
|
|
||||||
//fprintf(stdout,"msg_rrc_update_sens() time : %f\n", info_time); //dbg
|
|
||||||
|
|
||||||
memcpy( p->L2_id.L2_id, L2_id.L2_id, sizeof(L2_ID) ) ;
|
|
||||||
|
|
||||||
p->NB_info = NB_info ;
|
|
||||||
|
|
||||||
if ( NB_info > 0 ) {
|
|
||||||
memcpy( p->Sens_meas , Sens_meas, NB_info * sizeof(Sens_ch_t) ) ;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
msg->data = (char *) p ;
|
|
||||||
}
|
|
||||||
|
|
||||||
return msg ;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief La fonction formate en un message les parametres de la fonction
|
|
||||||
rrc_init_scan_req().
|
|
||||||
\return message formate
|
|
||||||
*/
|
|
||||||
|
|
||||||
msg_t *msg_rrc_init_scan_req(
|
|
||||||
Instance_t inst , //!< instance ID
|
|
||||||
L2_ID L2_id ,
|
|
||||||
unsigned int Start_fr,
|
|
||||||
unsigned int Stop_fr,
|
|
||||||
unsigned int Meas_band,
|
|
||||||
unsigned int Meas_tpf,
|
|
||||||
unsigned int Nb_channels,
|
|
||||||
unsigned int Overlap,
|
|
||||||
unsigned int Sampl_freq,
|
|
||||||
Transaction_t Trans_id //!< Transaction ID
|
|
||||||
|
|
||||||
)
|
|
||||||
{
|
|
||||||
msg_t *msg = RRM_CALLOC(msg_t , 1 ) ;
|
|
||||||
|
|
||||||
if ( msg != NULL ) {
|
|
||||||
rrc_init_scan_req_t *p = RRM_CALLOC(rrc_init_scan_req_t , 1 ) ;
|
|
||||||
|
|
||||||
if ( p != NULL ) {
|
|
||||||
init_rrc_msg_head(&(msg->head),inst,RRC_INIT_SCAN_REQ, sizeof( rrc_init_scan_req_t ) ,Trans_id);
|
|
||||||
|
|
||||||
memcpy( p->L2_id.L2_id, L2_id.L2_id, sizeof(L2_ID) ) ;
|
|
||||||
//mod_lor_10_03_12++
|
|
||||||
p->Start_fr = Start_fr;
|
|
||||||
p->Stop_fr = Stop_fr;
|
|
||||||
p->Meas_band = Meas_band;
|
|
||||||
p->Meas_tpf = Meas_tpf;
|
|
||||||
p->Nb_channels = Nb_channels;
|
|
||||||
p->Overlap = Overlap;
|
|
||||||
p->Sampl_freq = Sampl_freq;
|
|
||||||
//mod_lor_10_03_12--
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
msg->data = (char *) p ;
|
|
||||||
}
|
|
||||||
|
|
||||||
return msg ;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief La fonction formate en un message les parametres de la fonction
|
|
||||||
rrc_end_scan_conf().
|
|
||||||
\return message formate
|
|
||||||
*/
|
|
||||||
|
|
||||||
msg_t *msg_rrc_end_scan_conf(
|
|
||||||
Instance_t inst , //!< instance ID
|
|
||||||
L2_ID L2_id ,
|
|
||||||
Transaction_t Trans_id //!< Transaction ID
|
|
||||||
|
|
||||||
)
|
|
||||||
{
|
|
||||||
msg_t *msg = RRM_CALLOC(msg_t , 1 ) ;
|
|
||||||
|
|
||||||
if ( msg != NULL ) {
|
|
||||||
rrc_end_scan_conf_t *p = RRM_CALLOC(rrc_end_scan_conf_t , 1 ) ;
|
|
||||||
|
|
||||||
if ( p != NULL ) {
|
|
||||||
init_rrc_msg_head(&(msg->head),inst,RRC_END_SCAN_CONF, sizeof( rrc_end_scan_conf_t ) ,Trans_id);
|
|
||||||
|
|
||||||
memcpy( p->L2_id.L2_id, L2_id.L2_id, sizeof(L2_ID) ) ;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
msg->data = (char *) p ;
|
|
||||||
}
|
|
||||||
|
|
||||||
return msg ;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief La fonction formate en un message les parametres de la fonction
|
|
||||||
rrc_end_scan_req().
|
|
||||||
\return message formate
|
|
||||||
*/
|
|
||||||
msg_t *msg_rrc_end_scan_req(
|
|
||||||
Instance_t inst,
|
|
||||||
L2_ID L2_id ,
|
|
||||||
Transaction_t Trans_id
|
|
||||||
)
|
|
||||||
{
|
|
||||||
msg_t *msg = RRM_CALLOC(msg_t , 1 ) ;
|
|
||||||
|
|
||||||
//fprintf(stdout,"msg_rrc_end_scan_req\n"); //dbg
|
|
||||||
if ( msg != NULL ) {
|
|
||||||
rrc_end_scan_req_t *p = RRM_CALLOC(rrc_end_scan_req_t , 1 ) ;
|
|
||||||
|
|
||||||
if ( p != NULL ) {
|
|
||||||
init_rrc_msg_head(&(msg->head),inst,RRC_END_SCAN_REQ, sizeof( rrc_end_scan_req_t ) ,Trans_id);
|
|
||||||
memcpy( p->L2_id.L2_id, L2_id.L2_id, sizeof(L2_ID) ) ;
|
|
||||||
}
|
|
||||||
|
|
||||||
msg->data = (char *) p ;
|
|
||||||
}
|
|
||||||
|
|
||||||
return msg ;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief La fonction formate en un message les parametres de la fonction
|
|
||||||
rrc_init_mon_req().
|
|
||||||
\return message formate
|
|
||||||
*/
|
|
||||||
|
|
||||||
msg_t *msg_rrc_init_mon_req(
|
|
||||||
Instance_t inst , //!< instance ID
|
|
||||||
L2_ID L2_id ,
|
|
||||||
unsigned int *ch_to_scan ,
|
|
||||||
unsigned int NB_chan ,
|
|
||||||
unsigned int interval ,
|
|
||||||
Transaction_t Trans_id //!< Transaction ID
|
|
||||||
|
|
||||||
)
|
|
||||||
{
|
|
||||||
msg_t *msg = RRM_CALLOC(msg_t , 1 ) ;
|
|
||||||
|
|
||||||
if ( msg != NULL ) {
|
|
||||||
unsigned int size = sizeof( rrc_init_mon_req_t ) + (NB_chan-1) * sizeof(unsigned int) ;
|
|
||||||
|
|
||||||
rrc_init_mon_req_t *p = RRM_CALLOC2(rrc_init_mon_req_t , size ) ;
|
|
||||||
|
|
||||||
if ( p != NULL ) {
|
|
||||||
//for (int i=0; i<NB_chan; i++)
|
|
||||||
// fprintf(stdout,"msg_rrm_init_mon_req(), chan: %d\n", ch_to_scan[i]); //dbg
|
|
||||||
init_rrc_msg_head(&(msg->head),inst,RRC_INIT_MON_REQ, size ,Trans_id);
|
|
||||||
|
|
||||||
memcpy( p->L2_id.L2_id, L2_id.L2_id, sizeof(L2_ID) ) ;
|
|
||||||
p->NB_chan = NB_chan;
|
|
||||||
p->interval = interval;
|
|
||||||
|
|
||||||
if ( NB_chan != 0 )
|
|
||||||
memcpy( p->ch_to_scan, ch_to_scan, NB_chan*sizeof(unsigned int) );
|
|
||||||
|
|
||||||
// for (int i=0; i<NB_chan; i++)
|
|
||||||
// fprintf(stdout,"msg_rrm_init_mon_req(), after memcpy: %d\n", ch_to_scan[i]); //dbg
|
|
||||||
|
|
||||||
//fprintf(stderr,"pointer ch_to_scan @%p \n", p->ch_to_scan);//dbg
|
|
||||||
//for (int i=0; i<NB_chan;i++)//dbg
|
|
||||||
// fprintf(stderr,"channel %d to scan \n", p->ch_to_scan[i]);//dbg
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
msg->data = (char *) p ;
|
|
||||||
}
|
|
||||||
|
|
||||||
return msg ;
|
|
||||||
}
|
|
||||||
@@ -1,508 +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 rrc_msg.h
|
|
||||||
|
|
||||||
\brief Fichier d'entete contenant les declarations des types, des defines ,
|
|
||||||
et des fonctions relatives aux messages RRC-RRM ou RRC-RRCI.
|
|
||||||
|
|
||||||
Les fonctions servent à créer le buffer de message, remplir
|
|
||||||
l'entete et copier les parametres de fonction. Chaque fonction
|
|
||||||
retourne le message qui pourra être envoye sur le socket entre le
|
|
||||||
CMM et le RRM ou RRCI.
|
|
||||||
|
|
||||||
\author BURLOT Pascal
|
|
||||||
|
|
||||||
\date 17/07/08
|
|
||||||
|
|
||||||
\par Historique:
|
|
||||||
L.IACOBELLI 2009-10-19
|
|
||||||
+ sensing messages
|
|
||||||
|
|
||||||
*******************************************************************************
|
|
||||||
*/
|
|
||||||
#ifndef __RRC_RRM_MSG_H
|
|
||||||
#define __RRC_RRM_MSG_H
|
|
||||||
|
|
||||||
#include "L3_rrc_defs.h"
|
|
||||||
#include "COMMON/mac_rrc_primitives.h"
|
|
||||||
|
|
||||||
#ifdef OPENAIR2_IN
|
|
||||||
#include "rrm_sock.h"
|
|
||||||
#else
|
|
||||||
#include "RRC/MESH/rrc_rrm_interface.h"
|
|
||||||
#endif
|
|
||||||
//#include "../../../openair2/RRC/MESH/rrc_rrm_interface.h"
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief Enumeration des messages entre RRM/RRCI et le RRC
|
|
||||||
*/
|
|
||||||
typedef enum {
|
|
||||||
RRM_RB_ESTABLISH_REQ = 0 , ///< Message RRM->RRC : requete d'etablissement d'un RB
|
|
||||||
RRC_RB_ESTABLISH_RESP , ///< Message RRC->RRM : reponse d'etablissement d'un RB
|
|
||||||
RRC_RB_ESTABLISH_CFM , ///< Message RRC->RRM : confirmation d'etablissement d'un RB
|
|
||||||
RRM_RB_MODIFY_REQ , ///< Message RRM->RRC : requete de modification d'un RB
|
|
||||||
RRC_RB_MODIFY_RESP , ///< Message RRC->RRM : reponse de modification d'un RB
|
|
||||||
RRC_RB_MODIFY_CFM , ///< Message RRC->RRM : confirmation de modification d'un RB
|
|
||||||
RRM_RB_RELEASE_REQ , ///< Message RRM->RRC : requete de liberation d'un RB
|
|
||||||
RRC_RB_RELEASE_RESP , ///< Message RRC->RRM : reponse de liberation d'un RB
|
|
||||||
RRC_MR_ATTACH_IND , ///< Message RRC->RRM : indication d'attachement d'un MR
|
|
||||||
RRM_SENSING_MEAS_REQ , ///< Message RRM->RRC : requete de configuration de mesure sensing
|
|
||||||
RRC_SENSING_MEAS_RESP , ///< 10Message RRC->RRM : reponse de configuration de mesure sensing
|
|
||||||
RRC_CX_ESTABLISH_IND , ///< Message RRC->RRM : indication de connexion etablie
|
|
||||||
RRC_PHY_SYNCH_TO_MR_IND , ///< Message RRC->RRM : indication de synchronisation physique a un MR
|
|
||||||
RRC_PHY_SYNCH_TO_CH_IND , ///< Message RRC->RRM : indication de synchronisation physique a un CH
|
|
||||||
RRCI_CX_ESTABLISH_RESP , ///< Message RRCI->RRC : reponse de connexion etablie
|
|
||||||
RRC_SENSING_MEAS_IND , ///< Message RRC->RRM : indication de nouvel mesure de sensing
|
|
||||||
RRM_SENSING_MEAS_RESP , ///< Message RRM->RRC : reponse a l'indication de nouvel mesure de sensing
|
|
||||||
RRC_RB_MEAS_IND , ///< Message RRC->RRM : indication de nouvel mesure sur un RB
|
|
||||||
RRM_RB_MEAS_RESP , ///< Message RRM->RRC : reponse a l'indication de nouvel mesure sur un RB
|
|
||||||
RRM_INIT_CH_REQ , ///< Message RRM->RRC : init d'un CH
|
|
||||||
RRCI_INIT_MR_REQ , ///< 20Message RRM->RRC : init d'un MR
|
|
||||||
RRM_INIT_MON_REQ , ///< Message RRM->RRC : initiation of a scanning monitoring
|
|
||||||
RRM_INIT_SCAN_REQ , ///< Message RRM->RRC : initiation of a scanning process
|
|
||||||
RRC_INIT_SCAN_REQ , ///< Message RRC->RRM : initiation of a scanning process
|
|
||||||
//UPDATE_SENS_RESULTS_3 , ///< Message IP : update to send to CH/FC //mod_lor_10_01_25
|
|
||||||
RRM_END_SCAN_REQ , ///< Message RRM->RRC : end of a scanning process
|
|
||||||
RRC_END_SCAN_REQ , ///< Message RRC->RRM : end of a scanning process
|
|
||||||
RRC_END_SCAN_CONF , ///< Message RRC->RRM : end of a scanning process ack
|
|
||||||
RRC_INIT_MON_REQ , ///< Message RRM->RRC : initiation of a scanning monitoring
|
|
||||||
//OPEN_FREQ_QUERY_4 , ///< Message IP : BTS to ask free frequencies to FC
|
|
||||||
//UPDATE_OPEN_FREQ_7 , ///< 30Message IP : list of frequencies usable by the secondary network
|
|
||||||
//UPDATE_SN_OCC_FREQ_5 , ///< Message IP : BTS sends used freq. to FC
|
|
||||||
RRM_UP_FREQ_ASS , ///< Message RRM->RRC : BTS assigns channels to SUs (scen1)
|
|
||||||
RRM_END_SCAN_CONF , ///< Message RRM->RRC : end of a scanning process
|
|
||||||
RRC_UP_FREQ_ASS , ///< Message RRC->RRM ://mod_lor_10_06_04
|
|
||||||
RRM_UP_FREQ_ASS_SEC , ///< Message RRM->RRC : CH assigns channels to SUs (scen2) //add_lor_10_11_05
|
|
||||||
RRC_UP_FREQ_ASS_SEC , ///< Message RRC->RRM : frequencies assigned by CH (scen2) //add_lor_10_11_05
|
|
||||||
/*RRC_ASK_FOR_FREQ , ///< Message RRC->RRM : in FC/CH to report a frequency query
|
|
||||||
RRM_OPEN_FREQ , ///< Message RRM->RRC : FC communicates open frequencies
|
|
||||||
RRM_UPDATE_SN_FREQ , ///< Message RRM->RRC : BTS sends used freq. to FC
|
|
||||||
RRC_UPDATE_SN_FREQ , ///< Message RRC->RRM : FC receives used freq. from BTS
|
|
||||||
RRM_CLUST_SCAN_REQ , ///< Message RRM->RRC : CH1 contacts CH2 to collaborate for the sensing process
|
|
||||||
RRC_CLUST_SCAN_REQ , ///< Message RRC->RRM : CH2 receive request to collaborate for the sensing process from CH1
|
|
||||||
RRM_CLUST_SCAN_CONF , ///< Message RRM->RRC : CH2 confirmrs the beginning of a collaboration process
|
|
||||||
RRM_CLUST_MON_REQ , ///< Message RRM->RRC : CH1 contacts CH2 to collaborate for the monitoring process
|
|
||||||
RRC_CLUST_MON_REQ , ///< Message RRC->RRM : CH2 receive request to collaborate for the monitoring process from CH1
|
|
||||||
RRM_CLUST_MON_CONF , ///< Message RRM->RRC : CH2 confirmrs the beginning of a monitoring process
|
|
||||||
RRM_END_SCAN_CONF , ///< Message RRM->RRC : CH2 confirmrs the end of the collaborative sensing process at CH1
|
|
||||||
RRM_INIT_CONN_REQ , ///< Message RRM->RRC : SU 1 requests a connection to SU 2
|
|
||||||
RRC_INIT_CONN_CONF , ///< Message RRM->RRC : Confirm from SU2 about the requested connection
|
|
||||||
RRM_FREQ_ALL_PROP , ///< Message RRM->RRC : SU1 sends a proposition of teh frequencies to use
|
|
||||||
RRC_FREQ_ALL_PROP_CONF , ///< Message RRC->RRM : SU1 receives a confirm on the usable channels
|
|
||||||
RRM_REP_FREQ_ALL , ///< Message RRM->RRC : SU1 reports to CH the possible channels
|
|
||||||
RRC_REP_FREQ_ACK , ///< Message RRC->RRM : CH informs all SUs about a channel allocated to 2 SUs
|
|
||||||
RRC_INIT_CONN_REQ , ///< Message RRC->RRM : Request from SU1 to establish a connection
|
|
||||||
RRM_CONN_SET , ///< Message RRC->RRM : Response to SU1 and connection settings communicated to rcc
|
|
||||||
RRC_FREQ_ALL_PROP , ///< Message RRC->RRM : SU1 proposition of frequencies to use
|
|
||||||
RRM_FREQ_ALL_PROP_CONF , ///< Message RRC->RRM : SU2 choise of frequencies to use
|
|
||||||
RRC_REP_FREQ_ALL , ///< Message RRM->RRC : SU1 reports to CH the possible channels
|
|
||||||
RRM_REP_FREQ_ACK , ///< Message RRC->RRM : CH informs all SUs about a channel allocated to 2 SUs
|
|
||||||
*/NB_MSG_RRC_RRM ///< Nombre de message RRM-RRC
|
|
||||||
|
|
||||||
}
|
|
||||||
MSG_RRC_RRM_T ;
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief Definition des parametres de la fonction rrm_init_ch_req() dans
|
|
||||||
une structure permettant le passage des parametres via un socket
|
|
||||||
*/
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
LCHAN_DESC Lchan_desc_srb0 ; //!< Logical Channel Descriptor Array
|
|
||||||
LCHAN_DESC Lchan_desc_srb1 ; //!< Logical Channel Descriptor Array
|
|
||||||
L2_ID L2_id ; //!< Layer 2 (MAC) IDs for link
|
|
||||||
} rrm_init_ch_req_t ;
|
|
||||||
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief Definition des parametres de la fonction rrm_init_mr_req() dans
|
|
||||||
une structure permettant le passage des parametres via un socket
|
|
||||||
*/
|
|
||||||
typedef struct {
|
|
||||||
LCHAN_DESC Lchan_desc_srb0 ; //!< Logical Channel Descriptor Array
|
|
||||||
LCHAN_DESC Lchan_desc_srb1 ; //!< Logical Channel Descriptor Array
|
|
||||||
unsigned char CH_index ; //!< Layer 2 (MAC) IDs for CH
|
|
||||||
} rrci_init_mr_req_t ;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief Definition des parametres de la fonction rrm_rb_establish_req() dans
|
|
||||||
une structure permettant le passage des parametres via un socket
|
|
||||||
*/
|
|
||||||
typedef struct {
|
|
||||||
L2_ID L2_id[2] ; //!< Layer 2 (MAC) IDs for link
|
|
||||||
LCHAN_DESC Lchan_desc ; //!< Logical Channel Descriptor Array
|
|
||||||
MAC_RLC_MEAS_DESC Mac_rlc_meas_desc ; //!< MAC/RLC Measurement descriptors for RB
|
|
||||||
L3_INFO_T L3_info_t ; //!< Optional L3 Information
|
|
||||||
unsigned char L3_info[MAX_L3_INFO] ; //!< Type of L3 Information
|
|
||||||
} rrm_rb_establish_req_t ;
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief Definition des parametres de la fonction rrc_rb_establish_cfm() dans
|
|
||||||
une structure permettant le passage des parametres via un socket
|
|
||||||
*/
|
|
||||||
typedef struct {
|
|
||||||
RB_ID Rb_id ; //!< Radio Bearer ID used by RRC
|
|
||||||
RB_TYPE RB_type ; //!< Radio Bearer Type
|
|
||||||
} rrc_rb_establish_cfm_t ;
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief Definition des parametres de la fonction rrm_rb_modify_req() dans
|
|
||||||
une structure permettant le passage des parametres via un socket
|
|
||||||
*/
|
|
||||||
typedef struct {
|
|
||||||
LCHAN_DESC Lchan_desc ; //!< Logical Channel Descriptor Array
|
|
||||||
MAC_RLC_MEAS_DESC Mac_meas_desc ; //!< MAC/RLC Measurement descriptors for RB
|
|
||||||
RB_ID Rb_id ; //!< Radio Bearer ID
|
|
||||||
} rrm_rb_modify_req_t ;
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief Definition des parametres des fonctions rrc_rb_modify_cfm() et
|
|
||||||
rrm_rb_release_req() dans une structure permettant le passage des
|
|
||||||
parametres via un socket
|
|
||||||
*/
|
|
||||||
typedef struct {
|
|
||||||
RB_ID Rb_id ; //!< Radio Bearer ID
|
|
||||||
} rrc_rb_modify_cfm_t ,
|
|
||||||
rrm_rb_release_req_t ;
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief Definition des parametres de la fonction rrc_MR_attach_ind() dans
|
|
||||||
une structure permettant le passage des parametres via un socket
|
|
||||||
*/
|
|
||||||
typedef struct {
|
|
||||||
L2_ID L2_id ; //!< Layer 2 (MAC) ID
|
|
||||||
} rrc_MR_attach_ind_t ;
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief Definition des parametres de la fonction rrm_sensing_meas_req() dans
|
|
||||||
une structure permettant le passage des parametres via un socket
|
|
||||||
*/
|
|
||||||
typedef struct {
|
|
||||||
L2_ID L2_id ; //!< Layer 2 (MAC) ID
|
|
||||||
SENSING_MEAS_DESC Sensing_meas_desc ; //!< Sensing Measurement Descriptor
|
|
||||||
} rrm_sensing_meas_req_t ;
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief Definition des parametres de la fonction rrc_cx_establish_ind() dans
|
|
||||||
une structure permettant le passage des parametres via un socket
|
|
||||||
*/
|
|
||||||
typedef struct {
|
|
||||||
L2_ID L2_id ; //!< Layer 2 (MAC) ID
|
|
||||||
L3_INFO_T L3_info_t ; //!< Type of L3 Information
|
|
||||||
unsigned char L3_info[MAX_L3_INFO] ; //!< Optional L3 Information
|
|
||||||
RB_ID DTCH_B_id ; //!< RBID of broadcast IP service (MR only)
|
|
||||||
RB_ID DTCH_id ; //!< RBID of default IP service (MR only)
|
|
||||||
} rrc_cx_establish_ind_t ;
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief Definition des parametres de la fonction rrc_phy_synch_to_CH_ind() dans
|
|
||||||
une structure permettant le passage des parametres via un socket
|
|
||||||
*/
|
|
||||||
typedef struct {
|
|
||||||
unsigned int Ch_index ; //!< Clusterhead index
|
|
||||||
L2_ID L2_id ; //!< L2_ID du MR
|
|
||||||
} rrc_phy_synch_to_CH_ind_t ;
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief Definition des parametres de la fonction rrc_phy_synch_to_MR_ind() dans
|
|
||||||
une structure permettant le passage des parametres via un socket
|
|
||||||
*/
|
|
||||||
typedef struct {
|
|
||||||
L2_ID L2_id ; //!< L2_ID du CH
|
|
||||||
} rrc_phy_synch_to_MR_ind_t ;
|
|
||||||
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief Definition des parametres de la fonction rrci_cx_establish_resp() dans
|
|
||||||
une structure permettant le passage des parametres via un socket
|
|
||||||
*/
|
|
||||||
typedef struct {
|
|
||||||
L2_ID L2_id ;
|
|
||||||
unsigned char L3_info[MAX_L3_INFO] ; //!< Optional L3 Information
|
|
||||||
L3_INFO_T L3_info_t ; //!< Type of L3 Information
|
|
||||||
} rrci_cx_establish_resp_t ;
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief Definition des parametres de la fonction rrc_sensing_meas_ind_t() dans
|
|
||||||
une structure permettant le passage des parametres via un socket
|
|
||||||
*/
|
|
||||||
typedef struct {
|
|
||||||
L2_ID L2_id ; //!< Layer 2 ID (MAC) of sensing node
|
|
||||||
unsigned int NB_meas ; //!< Layer 2 ID (MAC) of sensing node
|
|
||||||
SENSING_MEAS_T Sensing_meas[NB_SENS_MAX]; //!< first Sensing Information
|
|
||||||
} rrc_sensing_meas_ind_t ;
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief Definition des parametres de la fonction rrc_rb_meas_ind() dans
|
|
||||||
une structure permettant le passage des parametres via un socket
|
|
||||||
*/
|
|
||||||
typedef struct {
|
|
||||||
RB_ID Rb_id ; //!< Radio Bearer ID
|
|
||||||
L2_ID L2_id ; //!< Layer 2 (MAC) IDs for link
|
|
||||||
MEAS_MODE Meas_mode ; //!< Measurement mode (periodic or event-driven)
|
|
||||||
MAC_RLC_MEAS_T Mac_rlc_meas ; //!< MAC/RLC measurements
|
|
||||||
} rrc_rb_meas_ind_t;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief Definition des parametres de les fonctions
|
|
||||||
rrm_update_sens()dans une structure permettant le passage
|
|
||||||
des parametres via un socket
|
|
||||||
*/
|
|
||||||
/*typedef struct {
|
|
||||||
L2_ID L2_id ; //!< Layer 2 ID (MAC) of sensing node
|
|
||||||
unsigned int NB_info ; //!< number of sensed channels
|
|
||||||
Sens_ch_t Sens_meas[NB_SENS_MAX] ; //!< sensing information
|
|
||||||
} rrm_update_sens_t ; */
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief Definition des parametres des fonctions rrm_init_mon_req(),
|
|
||||||
rrc_init_mon_req(), rrm_clust_mon_req(), rrc_clust_mon_req() dans
|
|
||||||
une structure permettant le passage des parametres via un socket
|
|
||||||
*/
|
|
||||||
typedef struct {
|
|
||||||
L2_ID L2_id ; //!< Layer 2 (MAC) ID of destination
|
|
||||||
unsigned int NB_chan ; //!< Number of channels to scan
|
|
||||||
unsigned int interval ; //!< Time between two sensing sessions
|
|
||||||
unsigned int ch_to_scan[NB_SENS_MAX]; //!< Vector of channels to scan
|
|
||||||
} rrm_init_mon_req_t,
|
|
||||||
rrc_init_mon_req_t/*,
|
|
||||||
rrm_clust_mon_req_t,
|
|
||||||
rrc_clust_mon_req_t*/;
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief Definition des parametres de la fonction rrm_init_scan_req() dans
|
|
||||||
une structure permettant le passage des parametres via un socket
|
|
||||||
*/
|
|
||||||
//mod_lor_10_03_12++
|
|
||||||
typedef struct {
|
|
||||||
unsigned int Start_fr; //!< Lowest frequency considered (MHz)
|
|
||||||
unsigned int Stop_fr; //!< Highest frequency considered (MHz)
|
|
||||||
unsigned int Meas_band; //!< Measurement bandwidth (KHz)
|
|
||||||
unsigned int Meas_tpf; //!< Measurement time per sub-band
|
|
||||||
unsigned int Nb_channels; //!< Number of sub-bands
|
|
||||||
unsigned int Overlap; //!< Overlap factor (%)
|
|
||||||
unsigned int Sampl_freq; //!< Sampling frequency (Ms/s)
|
|
||||||
} rrm_init_scan_req_t;
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief Definition des parametres de la fonction rrc_init_scan_req() dans
|
|
||||||
une structure permettant le passage des parametres via un socket
|
|
||||||
*/
|
|
||||||
typedef struct {
|
|
||||||
L2_ID L2_id ; //!< Layer 2 (MAC) ID of Fusion Centre
|
|
||||||
unsigned int Start_fr; //!< Lowest frequency considered (MHz)
|
|
||||||
unsigned int Stop_fr; //!< Highest frequency considered (MHz)
|
|
||||||
unsigned int Meas_band; //!< Measurement bandwidth (KHz)
|
|
||||||
unsigned int Meas_tpf; //!< Measurement time per sub-band
|
|
||||||
unsigned int Nb_channels; //!< Number of sub-bands
|
|
||||||
unsigned int Overlap; //!< Overlap factor (%)
|
|
||||||
unsigned int Sampl_freq; //!< Sampling frequency (Ms/s)
|
|
||||||
} rrc_init_scan_req_t;
|
|
||||||
//mod_lor_10_03_12--
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief Definition des parametres de la fonction rrm_end_scan_req() dans
|
|
||||||
une structure permettant le passage des parametres via un socket
|
|
||||||
*/
|
|
||||||
typedef struct {
|
|
||||||
L2_ID L2_id ; //!< Layer 2 (MAC) ID of destination sensor/FC
|
|
||||||
} rrm_end_scan_req_t,
|
|
||||||
rrc_end_scan_req_t,
|
|
||||||
rrc_end_scan_conf_t;
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief Definition des parametres de la fonction rrm_up_freq_ass() dans
|
|
||||||
une structure permettant le passage des parametres via un socket
|
|
||||||
*/
|
|
||||||
typedef struct {
|
|
||||||
L2_ID L2_id ; //!< Layer 2 (MAC) ID of SU
|
|
||||||
unsigned int NB_chan ; //!< Number of channels
|
|
||||||
CHANNEL_T ass_channels[NB_SENS_MAX]; //!< description of assigned channelS
|
|
||||||
} rrm_up_freq_ass_t ;
|
|
||||||
|
|
||||||
/*! //add_lor_10_11_05
|
|
||||||
*******************************************************************************
|
|
||||||
\brief Definition des parametres de la fonction rrm_up_freq_ass() dans
|
|
||||||
une structure permettant le passage des parametres via un socket
|
|
||||||
*/
|
|
||||||
typedef struct {
|
|
||||||
L2_ID L2_id [NB_SENS_MAX] ; //!< Layer 2 (MAC) ID of SU source
|
|
||||||
L2_ID L2_id_dest [NB_SENS_MAX] ; //!< Layer 2 (MAC) ID of SU source
|
|
||||||
unsigned int NB_all ; //!< Number of allocated channels
|
|
||||||
CHANNEL_T ass_channels[NB_SENS_MAX]; //!< description of assigned channelS
|
|
||||||
} rrm_up_freq_ass_sec_t ;
|
|
||||||
|
|
||||||
///< TYPEDEF VIA IP
|
|
||||||
//mod_lor_10_04_27++
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief Definition des parametres de les fonctions
|
|
||||||
rrm_update_sens()dans une structure permettant le passage
|
|
||||||
des parametres via un socket
|
|
||||||
*/
|
|
||||||
/*typedef struct {
|
|
||||||
L2_ID L2_id ; //!< Layer 2 ID (MAC) of sensing node
|
|
||||||
unsigned int NB_info ; //!< Number of sensed channels
|
|
||||||
Sens_ch_t Sens_meas[NB_SENS_MAX] ; //!< Sensing information
|
|
||||||
double info_time ; //!< Data of the information
|
|
||||||
} rrm_update_sens_t ; */
|
|
||||||
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief Definition des parametres de les fonctions rrm_ask_for_freq() et rrc_ask_for_freq()dans
|
|
||||||
une structure permettant le passage des parametres via un socket
|
|
||||||
*/
|
|
||||||
/*typedef struct {
|
|
||||||
L2_ID L2_id ; //!< Layer 2 (MAC) ID of Fusion Centre
|
|
||||||
QOS_CLASS_T QoS ; //!< QoS required; if 0 all QoS at disposition
|
|
||||||
} open_freq_query_t;*/
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief Definition des parametres de les fonctions
|
|
||||||
rrc_open_freq() et rrm_open_freq() dans une structure permettant le passage
|
|
||||||
des parametres via un socket
|
|
||||||
*/
|
|
||||||
/*typedef struct {
|
|
||||||
double date;
|
|
||||||
L2_ID L2_id ; //!< Layer 2 ID (MAC) of FC/CH
|
|
||||||
unsigned int NB_chan ; //!< number of free channels
|
|
||||||
CHANNEL_T fr_channels[NB_SENS_MAX]; //!< description of free channelS
|
|
||||||
} update_open_freq_t;*/
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief Definition des parametres des fonctions rrm_update_SN_freq() et
|
|
||||||
rrm_update_SN_freq()dans
|
|
||||||
une structure permettant le passage des parametres via un socket
|
|
||||||
*/
|
|
||||||
/*typedef struct {
|
|
||||||
L2_ID L2_id ; //!< Layer 2 (MAC) ID of FC/BTS
|
|
||||||
unsigned int NB_chan ; //!< Number of channels
|
|
||||||
unsigned int occ_channels[NB_SENS_MAX]; //!< Vector of channels
|
|
||||||
} update_SN_occ_freq_t;*/
|
|
||||||
//mod_lor_10_04_27--
|
|
||||||
|
|
||||||
#ifdef TRACE
|
|
||||||
extern const char *Str_msg_rrc_rrm[NB_MSG_RRC_RRM] ;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Rappel : les paramètres sont identiques aux fonctions
|
|
||||||
* (sans le prefixe msg_ ) du fichier: L3_rrc_interface.h
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
msg_t *msg_rrm_rb_establish_req( Instance_t inst,
|
|
||||||
const LCHAN_DESC *Lchan_desc, const MAC_RLC_MEAS_DESC *Mac_rlc_meas_desc,
|
|
||||||
L2_ID *L2_id, Transaction_t Trans_id, unsigned char *L3_info, L3_INFO_T L3_info_t );
|
|
||||||
|
|
||||||
|
|
||||||
msg_t *msg_rrm_rb_modify_req( Instance_t inst,
|
|
||||||
const LCHAN_DESC *Lchan_desc, const MAC_RLC_MEAS_DESC *Mac_meas_desc,
|
|
||||||
RB_ID Rb_id, Transaction_t Trans_id );
|
|
||||||
|
|
||||||
msg_t *msg_rrm_rb_release_req( Instance_t inst, RB_ID Rb_id, Transaction_t Trans_id );
|
|
||||||
|
|
||||||
msg_t *msg_rrm_sensing_meas_req( Instance_t inst,
|
|
||||||
L2_ID L2_id, SENSING_MEAS_DESC Sensing_meas_desc, Transaction_t Trans_id ) ;
|
|
||||||
|
|
||||||
msg_t *msg_rrci_cx_establish_resp( Instance_t inst,
|
|
||||||
Transaction_t Trans_id,L2_ID L2_id,
|
|
||||||
unsigned char *L3_info, L3_INFO_T L3_info_t );
|
|
||||||
|
|
||||||
msg_t *msg_rrm_sensing_meas_resp( Instance_t inst, Transaction_t Trans_id );
|
|
||||||
|
|
||||||
|
|
||||||
msg_t *msg_rrm_rb_meas_resp( Instance_t inst, Transaction_t Trans_id );
|
|
||||||
|
|
||||||
msg_t *msg_rrm_init_ch_req( Instance_t inst, Transaction_t Trans_id,
|
|
||||||
const LCHAN_DESC *Lchan_desc_srb0, const LCHAN_DESC *Lchan_desc_srb1,
|
|
||||||
L2_ID L2_id ) ;
|
|
||||||
|
|
||||||
msg_t *msg_rrci_init_mr_req( Instance_t inst,
|
|
||||||
Transaction_t Trans_id, const LCHAN_DESC *Lchan_desc_srb0,
|
|
||||||
const LCHAN_DESC *Lchan_desc_srb1, unsigned char CH_index);
|
|
||||||
|
|
||||||
msg_t *msg_rrm_init_mon_req(Instance_t inst, L2_ID L2_id, unsigned int NB_chan,
|
|
||||||
unsigned int interval, unsigned int *ch_to_scan, Transaction_t Trans_id );
|
|
||||||
msg_t *msg_rrm_init_scan_req(Instance_t inst, unsigned int Start_fr, unsigned int Stop_fr,unsigned int Meas_band,
|
|
||||||
unsigned int Meas_tpf, unsigned int Nb_channels,unsigned int Overlap, unsigned int Sampl_freq, Transaction_t Trans_id ); //mod_lor_10_03_12
|
|
||||||
msg_t *msg_rrm_end_scan_req( Instance_t inst, L2_ID L2_id, Transaction_t Trans_id );
|
|
||||||
msg_t *msg_rrm_up_freq_ass( Instance_t inst, L2_ID L2_id, unsigned int NB_chan, CHANNEL_T *ass_channels);
|
|
||||||
msg_t *msg_rrm_end_scan_conf( Instance_t inst, Transaction_t Trans_id);
|
|
||||||
msg_t *msg_rrm_up_freq_ass_sec( Instance_t inst, L2_ID *L2_id, L2_ID *L2_id_dest,unsigned int NB_all, CHANNEL_T *ass_channels);//add_lor_10_11_05
|
|
||||||
|
|
||||||
|
|
||||||
/*//mod_lor_10_04_27++
|
|
||||||
///MESSAGES VIA IP
|
|
||||||
msg_t *msg_update_sens_results_3( Instance_t inst, L2_ID L2_id, unsigned int NB_chan, Sens_ch_t *Sens_meas, Transaction_t Trans_id );
|
|
||||||
msg_t *msg_open_freq_query_4( Instance_t inst, L2_ID L2_id, QOS_CLASS_T QoS, Transaction_t Trans_id );
|
|
||||||
msg_t *msg_update_open_freq_7( Instance_t inst, L2_ID L2_id, unsigned int NB_free_ch, CHANNEL_T *fr_channels, Transaction_t Trans_id);
|
|
||||||
msg_t *msg_update_SN_occ_freq_5( Instance_t inst, L2_ID L2_id, unsigned int NB_chan, unsigned int *occ_channels, Transaction_t Trans_id);
|
|
||||||
//mod_lor_10_04_27--*/
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif /* RRC_MSG_H */
|
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -1,2 +0,0 @@
|
|||||||
# L2_ID des noeuds
|
|
||||||
0xAA 0x55 0x77 0x33 0xCC 0xFF 0xDD 0xBB
|
|
||||||
@@ -1,171 +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 rrm.h
|
|
||||||
|
|
||||||
\brief Fichier d'entete contenant les declarations des types, des defines ,
|
|
||||||
et des fonctions relatives aux fonctions du RRM (Radio Resource Management ).
|
|
||||||
|
|
||||||
\author BURLOT Pascal
|
|
||||||
|
|
||||||
\date 15/07/08
|
|
||||||
|
|
||||||
|
|
||||||
\par Historique:
|
|
||||||
P.BURLOT 2009-01-20
|
|
||||||
+ separation de la file de message CMM/RRM a envoyer en 2 files
|
|
||||||
distinctes ( file_send_cmm_msg, file_send_rrc_msg)
|
|
||||||
L.IACOBELLI 2009-10-19
|
|
||||||
+ sensing database
|
|
||||||
+ Fusion centre and BTS role
|
|
||||||
|
|
||||||
*******************************************************************************
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef RRM_H
|
|
||||||
#define RRM_H
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief Nombre max. d'instance de RRM (Emulation)
|
|
||||||
*/
|
|
||||||
#define MAX_RRM 10
|
|
||||||
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief Structure definissant une instance RRM
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
int id ; ///< identification de l'instance RRM
|
|
||||||
enum {
|
|
||||||
ISOLATEDNODE=0 , ///< Node is in a isolated State
|
|
||||||
CLUSTERHEAD_INIT0, ///< Node is in a Cluster Head initialization State
|
|
||||||
CLUSTERHEAD_INIT1, ///< Node is in a Cluster Head initialization State
|
|
||||||
CLUSTERHEAD , ///< Node is in a Cluster Head State
|
|
||||||
MESHROUTER , ///< Node is in a Mesh Router State
|
|
||||||
} state ; ///< etat de l'instance
|
|
||||||
enum {
|
|
||||||
NOROLE=0 , ///< Node has not a specific role
|
|
||||||
FUSIONCENTER , ///< Node acts as Fusion Center
|
|
||||||
BTS , ///< Node acts as BTS
|
|
||||||
CH_COLL ///< Node acts as Cluster Head collaborating with the CH at the address L2_id_FC
|
|
||||||
} role ; ///< role of the node
|
|
||||||
|
|
||||||
L2_ID L2_id ; ///< identification de niveau L2
|
|
||||||
L2_ID L2_id_FC ; ///< Fusion Centre or Cluster Head address. In CH1 of sendora scenario 2 centralized it is the address of the other CH
|
|
||||||
L3_INFO_T L3_info_t ; ///< type de l'identification de niveau L3
|
|
||||||
|
|
||||||
unsigned char L3_info[MAX_L3_INFO]; ///< identification de niveau L3
|
|
||||||
//mod_lor_10_01_25
|
|
||||||
unsigned char L3_info_corr[MAX_L3_INFO]; ///< identification de niveau L3 du correspondant: FC si le noeud est un senseur ou la BS, BS si le noeud est le FC, CH1 for CH2, CH2 for CH1
|
|
||||||
|
|
||||||
file_head_t file_send_cmm_msg ; ///< File des messages en emission
|
|
||||||
file_head_t file_send_rrc_msg ; ///< File des messages en emission
|
|
||||||
file_head_t file_send_sensing_msg ; ///< File des messages en emission
|
|
||||||
file_head_t file_send_ip_msg ; ///< File des messages en emission //mod_lor_10_01_25
|
|
||||||
file_head_t file_recv_msg ; ///< File des messages en reception
|
|
||||||
|
|
||||||
struct {
|
|
||||||
sock_rrm_t *s ; ///< Socket associé a l'interface CMM
|
|
||||||
unsigned int trans_cnt ; ///< Compteur de transaction avec l'interface CMM
|
|
||||||
transact_t *transaction ; ///< liste des transactions non terminees
|
|
||||||
pthread_mutex_t exclu ; ///< mutex pour le partage de structure
|
|
||||||
|
|
||||||
|
|
||||||
} cmm ; ///< info relatif a l'interface CMM
|
|
||||||
|
|
||||||
struct {
|
|
||||||
#ifdef TRACE
|
|
||||||
FILE *fd ; ///< Fichier pour trace de debug : action RRM->RRC
|
|
||||||
#endif
|
|
||||||
sock_rrm_t *s ; ///< Socket associé a l'interface RRC
|
|
||||||
unsigned int trans_cnt ; ///< Compteur de transaction avec l'interface RRC
|
|
||||||
transact_t *transaction ; ///< liste des transactions non terminees
|
|
||||||
pthread_mutex_t exclu ; ///< mutex pour le partage de structure
|
|
||||||
|
|
||||||
neighbor_desc_t *pNeighborEntry ; ///< Descripteur sur le voisinage
|
|
||||||
RB_desc_t *pRbEntry ; ///< Descripteur sur les RB (radio bearer) ouverts
|
|
||||||
Sens_node_t *pSensEntry ; ///< Desrcipteur sur les info du sensing
|
|
||||||
CHANNELS_DB_T *pChannelsEntry ; ///< Desrcipteur sur les info des canaux
|
|
||||||
} rrc ; ///< info relatif a l'interface rrc
|
|
||||||
|
|
||||||
struct {
|
|
||||||
sock_rrm_t *s ; ///< Socket associé a l'interface PUSU
|
|
||||||
unsigned int trans_cnt ; ///< Compteur de transaction avec l'interface PUSU
|
|
||||||
transact_t *transaction ; ///< liste des transactions non terminees
|
|
||||||
pthread_mutex_t exclu ; ///< mutex pour le partage de structure
|
|
||||||
} pusu ; ///< info relatif a l'interface pusu
|
|
||||||
|
|
||||||
struct {
|
|
||||||
sock_rrm_t *s ; ///< Socket associé a l'interface SENSING
|
|
||||||
unsigned int trans_cnt ; ///< Compteur de transaction avec l'interface SENSING
|
|
||||||
transact_t *transaction ; ///< liste des transactions non terminees
|
|
||||||
unsigned int sens_active ; ///< flag to determine if node is performing sensing //mod_lor_10_04_21
|
|
||||||
pthread_mutex_t exclu ; ///< mutex pour le partage de structure
|
|
||||||
} sensing ; ///< info relatif a l'interface SENSING
|
|
||||||
|
|
||||||
//mod_lor_10_04_20++
|
|
||||||
struct {
|
|
||||||
sock_rrm_t *s ; ///< Socket associé a l'interface SENSING
|
|
||||||
pthread_mutex_t exclu ; ///< mutex pour le partage de structure
|
|
||||||
} graph ;
|
|
||||||
//mod_lor_10_04_20--
|
|
||||||
|
|
||||||
//mod_lor_10_01_25++
|
|
||||||
struct {
|
|
||||||
sock_rrm_int_t *s ; ///< Socket associé a l'IP
|
|
||||||
unsigned int trans_cnt ; ///< Compteur de transaction avec l'interface IP
|
|
||||||
transact_t *transaction ; ///< liste des transactions non terminees
|
|
||||||
unsigned int waiting_SN_update ; ///< flag to know if an update is expected from SN about frequencies in use //mod_lor_10_05_18
|
|
||||||
unsigned int users_waiting_update ; ///< flag to know if there are users that wait for channels //add_lor_10_11_08
|
|
||||||
L2_ID L2_id_wait_users[NB_SENS_MAX][2] ; ///< vector of users waiting for channels //add_lor_10_11_08
|
|
||||||
pthread_mutex_t exclu ; ///< mutex pour le partage de structure
|
|
||||||
} ip ; ///< info relatif a l'interface IP
|
|
||||||
//mod_lor_10_01_25--
|
|
||||||
|
|
||||||
} rrm_t ;
|
|
||||||
|
|
||||||
extern rrm_t rrm_inst[MAX_RRM] ;
|
|
||||||
extern int nb_inst ;
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif /* RRM_H */
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
killall emul_int
|
|
||||||
killall rrm
|
|
||||||
|
|
||||||
xterm -T CMM -hold -e ./emul_int &
|
|
||||||
sleep 2
|
|
||||||
./rrm -i 6 #2> log.txt
|
|
||||||
#sleep 1
|
|
||||||
#./emul_int
|
|
||||||
|
|
||||||
@@ -1,838 +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 rrm_2_rrc_msg.c
|
|
||||||
|
|
||||||
\brief Fonctions permettant le formattage des donnees pour l'envoi d'un
|
|
||||||
message sur le socket entre le RRC et le RRM
|
|
||||||
|
|
||||||
\author BURLOT Pascal
|
|
||||||
|
|
||||||
\date 16/07/08
|
|
||||||
|
|
||||||
|
|
||||||
\par Historique:
|
|
||||||
P.BURLOT 2009-01-20
|
|
||||||
+ L2_id: ajout de memcpy() dans msg_rrci_cx_establish_resp()
|
|
||||||
|
|
||||||
L. IACOBELLI 2010-01-05
|
|
||||||
+ new messages for sensing
|
|
||||||
+ messages sent via ip
|
|
||||||
|
|
||||||
*******************************************************************************
|
|
||||||
*/
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <errno.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <unistd.h>
|
|
||||||
|
|
||||||
#include <sys/socket.h>
|
|
||||||
#include <sys/un.h>
|
|
||||||
|
|
||||||
#include "L3_rrc_defs.h"
|
|
||||||
#include "rrm_sock.h"
|
|
||||||
#include "L3_rrc_interface.h"
|
|
||||||
#include "rrc_rrm_msg.h"
|
|
||||||
#include "rrm_util.h"
|
|
||||||
|
|
||||||
#ifdef TRACE
|
|
||||||
//! Macro creant la chaine a partir du nom de la variable
|
|
||||||
#define STRINGIZER(x) #x
|
|
||||||
//! Tableau pour le mode trace faisant la translation entre le numero et le nom du message
|
|
||||||
const char *Str_msg_rrc_rrm[NB_MSG_RRC_RRM] = {
|
|
||||||
STRINGIZER(RRM_RB_ESTABLISH_REQ ),
|
|
||||||
STRINGIZER(RRC_RB_ESTABLISH_RESP ),
|
|
||||||
STRINGIZER(RRC_RB_ESTABLISH_CFM ),
|
|
||||||
STRINGIZER(RRM_RB_MODIFY_REQ ),
|
|
||||||
STRINGIZER(RRC_RB_MODIFY_RESP ),
|
|
||||||
STRINGIZER(RRC_RB_MODIFY_CFM ),
|
|
||||||
STRINGIZER(RRM_RB_RELEASE_REQ ),
|
|
||||||
STRINGIZER(RRC_RB_RELEASE_RESP ),
|
|
||||||
STRINGIZER(RRC_MR_ATTACH_IND ),
|
|
||||||
STRINGIZER(RRM_SENSING_MEAS_REQ ),
|
|
||||||
STRINGIZER(RRC_SENSING_MEAS_RESP ),
|
|
||||||
STRINGIZER(RRC_CX_ESTABLISH_IND ),
|
|
||||||
STRINGIZER(RRC_PHY_SYNCH_TO_MR_IND ),
|
|
||||||
STRINGIZER(RRC_PHY_SYNCH_TO_CH_IND ),
|
|
||||||
STRINGIZER(RRCI_CX_ESTABLISH_RESP ),
|
|
||||||
STRINGIZER(RRC_SENSING_MEAS_IND ),
|
|
||||||
STRINGIZER(RRM_SENSING_MEAS_RESP ),
|
|
||||||
STRINGIZER(RRC_RB_MEAS_IND ),
|
|
||||||
STRINGIZER(RRM_RB_MEAS_RESP ),
|
|
||||||
STRINGIZER(RRM_INIT_CH_REQ ),
|
|
||||||
STRINGIZER(RRM_INIT_MR_REQ ),
|
|
||||||
STRINGIZER(RRM_INIT_MON_REQ ),
|
|
||||||
STRINGIZER(RRM_INIT_SCAN_REQ ),
|
|
||||||
STRINGIZER(RRC_INIT_SCAN_REQ ),
|
|
||||||
STRINGIZER(UPDATE_SENS_RESULTS_3 ), //mod_lor_10_01_25
|
|
||||||
STRINGIZER(RRM_END_SCAN_REQ ),
|
|
||||||
STRINGIZER(RRC_END_SCAN_REQ ),
|
|
||||||
STRINGIZER(RRC_END_SCAN_CONF ),
|
|
||||||
STRINGIZER(RRC_INIT_MON_REQ ),
|
|
||||||
STRINGIZER(OPEN_FREQ_QUERY_4 ),
|
|
||||||
STRINGIZER(UPDATE_OPEN_FREQ_7 ),
|
|
||||||
STRINGIZER(UPDATE_SN_OCC_FREQ_5 ),
|
|
||||||
STRINGIZER(RRM_UP_FREQ_ASS ),
|
|
||||||
STRINGIZER(RRM_END_SCAN_CONF ),
|
|
||||||
STRINGIZER(RRC_UP_FREQ_ASS ),//add_lor_10_11_05
|
|
||||||
STRINGIZER(RRM_UP_FREQ_ASS_SEC ),//add_lor_10_11_05
|
|
||||||
STRINGIZER(RRC_UP_FREQ_ASS_SEC )/*,//add_lor_10_11_05
|
|
||||||
STRINGIZER(RRM_OPEN_FREQ ),
|
|
||||||
STRINGIZER(RRM_UPDATE_SN_FREQ ),
|
|
||||||
STRINGIZER(RRC_UPDATE_SN_FREQ ),
|
|
||||||
STRINGIZER(RRM_CLUST_SCAN_REQ ),
|
|
||||||
STRINGIZER(RRC_CLUST_SCAN_REQ ),
|
|
||||||
STRINGIZER(RRM_CLUST_SCAN_CONF ),
|
|
||||||
STRINGIZER(RRM_CLUST_MON_REQ ),
|
|
||||||
STRINGIZER(RRC_CLUST_MON_REQ ),
|
|
||||||
STRINGIZER(RRM_CLUST_MON_CONF ),
|
|
||||||
STRINGIZER(RRM_END_SCAN_CONF ),
|
|
||||||
STRINGIZER(RRM_INIT_CONN_REQ ),
|
|
||||||
STRINGIZER(RRC_INIT_CONN_CONF ),
|
|
||||||
STRINGIZER(RRM_FREQ_ALL_PROP ),
|
|
||||||
STRINGIZER(RRC_FREQ_ALL_PROP_CONF ),
|
|
||||||
STRINGIZER(RRM_REP_FREQ_ALL ),
|
|
||||||
STRINGIZER(RRC_REP_FREQ_ACK ),
|
|
||||||
STRINGIZER(RRC_INIT_CONN_REQ ),
|
|
||||||
STRINGIZER(RRM_CONN_SET ),
|
|
||||||
STRINGIZER(RRC_FREQ_ALL_PROP ),
|
|
||||||
STRINGIZER(RRM_FREQ_ALL_PROP_CONF ),
|
|
||||||
STRINGIZER(RRC_REP_FREQ_ALL ),
|
|
||||||
STRINGIZER(RRM_REP_FREQ_ACK ) */
|
|
||||||
|
|
||||||
} ;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief This function initialize the message header
|
|
||||||
\return any return value
|
|
||||||
*/
|
|
||||||
static void init_rrc_msg_head(
|
|
||||||
msg_head_t *msg_head , //!< message header to initialize
|
|
||||||
Instance_t inst , //!< instance ID
|
|
||||||
MSG_RRC_RRM_T msg_type , //!< type of message to initialize
|
|
||||||
unsigned int size , //!< size of message
|
|
||||||
Transaction_t Trans_id //!< transaction id associated to this message
|
|
||||||
)
|
|
||||||
{
|
|
||||||
if ( msg_head != NULL ) {
|
|
||||||
msg_head->start = START_MSG ;
|
|
||||||
msg_head->msg_type = 0xFF & msg_type ;
|
|
||||||
msg_head->inst = inst ;
|
|
||||||
msg_head->Trans_id = Trans_id ;
|
|
||||||
msg_head->size = size;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief La fonction formate en un message les parametres de la fonction
|
|
||||||
rrm_rb_establish_req().
|
|
||||||
\return message formate
|
|
||||||
*/
|
|
||||||
msg_t *msg_rrm_rb_establish_req(
|
|
||||||
Instance_t inst , //!< instance ID
|
|
||||||
const LCHAN_DESC *Lchan_desc , //!< Logical Channel Descriptor Array
|
|
||||||
const MAC_RLC_MEAS_DESC *Mac_rlc_meas_desc , //!< MAC/RLC Measurement descriptors for RB
|
|
||||||
L2_ID *L2_id , //!< Layer 2 (MAC) IDs for link
|
|
||||||
Transaction_t Trans_id , //!< Transaction ID
|
|
||||||
unsigned char *L3_info , //!< Optional L3 Information
|
|
||||||
L3_INFO_T L3_info_t //!< Type of L3 Information
|
|
||||||
)
|
|
||||||
{
|
|
||||||
msg_t *msg = RRM_CALLOC(msg_t , 1 ) ;
|
|
||||||
|
|
||||||
if ( msg != NULL ) {
|
|
||||||
rrm_rb_establish_req_t *p = RRM_CALLOC(rrm_rb_establish_req_t ,1 ) ;
|
|
||||||
|
|
||||||
if ( p != NULL ) {
|
|
||||||
init_rrc_msg_head(&(msg->head),inst,RRM_RB_ESTABLISH_REQ, sizeof( rrm_rb_establish_req_t) ,Trans_id);
|
|
||||||
|
|
||||||
memcpy(&(p->Lchan_desc), Lchan_desc, sizeof(LCHAN_DESC) );
|
|
||||||
memcpy(&(p->Mac_rlc_meas_desc), Mac_rlc_meas_desc, sizeof(MAC_RLC_MEAS_DESC) );
|
|
||||||
memcpy(&(p->L2_id[0]), L2_id, 2*sizeof(L2_ID) ); // SRC+DST
|
|
||||||
p->L3_info_t = L3_info_t ;
|
|
||||||
|
|
||||||
if ( L3_info_t != NONE_L3 )
|
|
||||||
memcpy( p->L3_info, L3_info, L3_info_t );
|
|
||||||
}
|
|
||||||
|
|
||||||
msg->data = (char *) p ;
|
|
||||||
}
|
|
||||||
|
|
||||||
return msg ;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief La fonction formate en un message les parametres de la fonction
|
|
||||||
rrm_rb_modify_req().
|
|
||||||
\return message formate
|
|
||||||
*/
|
|
||||||
msg_t *msg_rrm_rb_modify_req(
|
|
||||||
Instance_t inst , //!< instance ID
|
|
||||||
const LCHAN_DESC *Lchan_desc , //!< Logical Channel Descriptor Array
|
|
||||||
const MAC_RLC_MEAS_DESC *Mac_meas_desc , //!< MAC/RLC Measurement descriptors for RB
|
|
||||||
RB_ID Rb_id , //!< Radio Bearer ID
|
|
||||||
Transaction_t Trans_id //!< Transaction ID
|
|
||||||
)
|
|
||||||
{
|
|
||||||
msg_t *msg = RRM_CALLOC(msg_t , 1 ) ;
|
|
||||||
|
|
||||||
if ( msg != NULL ) {
|
|
||||||
rrm_rb_modify_req_t *p = RRM_CALLOC(rrm_rb_modify_req_t , 1) ;
|
|
||||||
|
|
||||||
if ( p != NULL ) {
|
|
||||||
init_rrc_msg_head(&(msg->head),inst,RRM_RB_MODIFY_REQ, sizeof( rrm_rb_modify_req_t) ,Trans_id);
|
|
||||||
|
|
||||||
memcpy(&(p->Lchan_desc), Lchan_desc, sizeof(LCHAN_DESC) );
|
|
||||||
memcpy(&(p->Mac_meas_desc), Mac_meas_desc, sizeof(MAC_RLC_MEAS_DESC) );
|
|
||||||
|
|
||||||
p->Rb_id = Rb_id ;
|
|
||||||
}
|
|
||||||
|
|
||||||
msg->data = (char *) p ;
|
|
||||||
}
|
|
||||||
|
|
||||||
return msg ;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief La fonction formate en un message les parametres de la fonction
|
|
||||||
rrm_rb_release_req().
|
|
||||||
\return message formate
|
|
||||||
*/
|
|
||||||
msg_t *msg_rrm_rb_release_req(
|
|
||||||
Instance_t inst , //!< instance ID
|
|
||||||
RB_ID Rb_id , //!< Radio Bearer ID
|
|
||||||
Transaction_t Trans_id //!< Transaction ID
|
|
||||||
)
|
|
||||||
{
|
|
||||||
msg_t *msg = RRM_CALLOC(msg_t , 1 ) ;
|
|
||||||
|
|
||||||
if ( msg != NULL ) {
|
|
||||||
rrm_rb_release_req_t *p = RRM_CALLOC(rrm_rb_release_req_t , 1 ) ;
|
|
||||||
|
|
||||||
if ( p != NULL ) {
|
|
||||||
init_rrc_msg_head(&(msg->head),inst,RRM_RB_RELEASE_REQ, sizeof( rrm_rb_release_req_t) ,Trans_id);
|
|
||||||
|
|
||||||
p->Rb_id = Rb_id ;
|
|
||||||
}
|
|
||||||
|
|
||||||
msg->data = (char *) p ;
|
|
||||||
}
|
|
||||||
|
|
||||||
return msg ;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief La fonction formate en un message les parametres de la fonction
|
|
||||||
rrm_sensing_meas_req().
|
|
||||||
\return message formate
|
|
||||||
*/
|
|
||||||
msg_t *msg_rrm_sensing_meas_req(
|
|
||||||
Instance_t inst , //!< instance ID
|
|
||||||
L2_ID L2_id , //!< Layer 2 (MAC) ID
|
|
||||||
SENSING_MEAS_DESC Sensing_meas_desc , //!< Sensing Measurement Descriptor
|
|
||||||
Transaction_t Trans_id //!< Transaction ID
|
|
||||||
)
|
|
||||||
{
|
|
||||||
msg_t *msg = RRM_CALLOC(msg_t , 1 ) ;
|
|
||||||
|
|
||||||
if ( msg != NULL ) {
|
|
||||||
rrm_sensing_meas_req_t *p = RRM_CALLOC(rrm_sensing_meas_req_t , 1 ) ;
|
|
||||||
|
|
||||||
if ( p != NULL ) {
|
|
||||||
init_rrc_msg_head(&(msg->head),inst,RRM_SENSING_MEAS_REQ, sizeof( rrm_sensing_meas_req_t) ,Trans_id);
|
|
||||||
|
|
||||||
memcpy( p->L2_id.L2_id, L2_id.L2_id, sizeof(L2_ID) ) ;
|
|
||||||
memcpy(&(p->Sensing_meas_desc), &Sensing_meas_desc, sizeof(SENSING_MEAS_DESC)) ;
|
|
||||||
}
|
|
||||||
|
|
||||||
msg->data = (char *) p ;
|
|
||||||
}
|
|
||||||
|
|
||||||
return msg ;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief La fonction formate en un message les parametres de la fonction
|
|
||||||
rrci_cx_establish_resp().
|
|
||||||
\return message formate
|
|
||||||
*/
|
|
||||||
msg_t * msg_rrci_cx_establish_resp(
|
|
||||||
Instance_t inst , //!< instance ID
|
|
||||||
Transaction_t Trans_id , //!< Transaction ID
|
|
||||||
L2_ID L2_id , //!< Layer 2 (MAC) ID
|
|
||||||
unsigned char *L3_info , //!< Optional L3 Information
|
|
||||||
L3_INFO_T L3_info_t //!< Type of L3 Information
|
|
||||||
)
|
|
||||||
{
|
|
||||||
msg_t *msg = RRM_CALLOC(msg_t , 1 ) ;
|
|
||||||
|
|
||||||
if ( msg != NULL ) {
|
|
||||||
rrci_cx_establish_resp_t *p = RRM_CALLOC(rrci_cx_establish_resp_t , 1 ) ;
|
|
||||||
|
|
||||||
if ( p != NULL ) {
|
|
||||||
init_rrc_msg_head(&(msg->head),inst,RRCI_CX_ESTABLISH_RESP, sizeof( rrci_cx_establish_resp_t ) ,Trans_id);
|
|
||||||
|
|
||||||
memcpy( p->L2_id.L2_id, L2_id.L2_id, sizeof(L2_ID) ) ;
|
|
||||||
p->L3_info_t = L3_info_t ;
|
|
||||||
|
|
||||||
if ( L3_info_t != NONE_L3 )
|
|
||||||
memcpy( p->L3_info, L3_info, L3_info_t );
|
|
||||||
}
|
|
||||||
|
|
||||||
msg->data = (char *) p ;
|
|
||||||
}
|
|
||||||
|
|
||||||
return msg ;
|
|
||||||
}
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief La fonction formate en un message generique de reponse pour les
|
|
||||||
fonctions :
|
|
||||||
- msg_rrm_sensing_meas_resp(), msg_rrm_rb_meas_resp().
|
|
||||||
\return message formate
|
|
||||||
*/
|
|
||||||
static msg_t *msg_rrm_generic_resp(
|
|
||||||
Instance_t inst , //!< instance ID
|
|
||||||
MSG_RRC_RRM_T msg_type , //!< type of message
|
|
||||||
Transaction_t Trans_id //!< Transaction ID
|
|
||||||
)
|
|
||||||
{
|
|
||||||
msg_t *msg = RRM_CALLOC(msg_t , 1 ) ;
|
|
||||||
|
|
||||||
if ( msg != NULL ) {
|
|
||||||
init_rrc_msg_head(&(msg->head),inst,msg_type, 0, Trans_id);
|
|
||||||
msg->data = NULL ;
|
|
||||||
}
|
|
||||||
|
|
||||||
return msg ;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief La fonction formate en un message les parametres de la fonction
|
|
||||||
rrm_sensing_meas_resp().
|
|
||||||
\return message formate
|
|
||||||
*/
|
|
||||||
msg_t * msg_rrm_sensing_meas_resp(
|
|
||||||
Instance_t inst , //!< instance ID
|
|
||||||
Transaction_t Trans_id //!< Transaction ID
|
|
||||||
)
|
|
||||||
{
|
|
||||||
return msg_rrm_generic_resp( inst,RRM_SENSING_MEAS_RESP, Trans_id) ;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief La fonction formate en un message les parametres de la fonction
|
|
||||||
rrm_rb_meas_resp().
|
|
||||||
\return message formate
|
|
||||||
*/
|
|
||||||
msg_t * msg_rrm_rb_meas_resp(
|
|
||||||
Instance_t inst , //!< instance ID
|
|
||||||
Transaction_t Trans_id //!< Transaction ID
|
|
||||||
)
|
|
||||||
{
|
|
||||||
return msg_rrm_generic_resp( inst,RRM_RB_MEAS_RESP, Trans_id) ;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief La fonction formate en un message les parametres de la fonction
|
|
||||||
rrm_init_ch_req().
|
|
||||||
\return message formate
|
|
||||||
*/
|
|
||||||
msg_t *msg_rrm_init_ch_req(
|
|
||||||
Instance_t inst , //!< instance ID
|
|
||||||
Transaction_t Trans_id , //!< Transaction ID
|
|
||||||
const LCHAN_DESC *Lchan_desc_srb0 , //!< Logical Channel Descriptor - SRB0
|
|
||||||
const LCHAN_DESC *Lchan_desc_srb1 , //!< Logical Channel Descriptor - SRB1
|
|
||||||
L2_ID L2_id
|
|
||||||
)
|
|
||||||
{
|
|
||||||
msg_t *msg = RRM_CALLOC(msg_t , 1 ) ;
|
|
||||||
|
|
||||||
if ( msg != NULL ) {
|
|
||||||
rrm_init_ch_req_t *p = RRM_CALLOC(rrm_init_ch_req_t , 1 ) ;
|
|
||||||
|
|
||||||
if ( p != NULL ) {
|
|
||||||
init_rrc_msg_head(&(msg->head),inst,RRM_INIT_CH_REQ, sizeof( rrm_init_ch_req_t ) ,Trans_id);
|
|
||||||
|
|
||||||
memcpy(&(p->Lchan_desc_srb0), Lchan_desc_srb0, sizeof(LCHAN_DESC) );
|
|
||||||
memcpy(&(p->Lchan_desc_srb1), Lchan_desc_srb1, sizeof(LCHAN_DESC) );
|
|
||||||
memcpy( p->L2_id.L2_id, L2_id.L2_id, sizeof(L2_ID) ) ;
|
|
||||||
}
|
|
||||||
|
|
||||||
msg->data = (char *) p ;
|
|
||||||
}
|
|
||||||
|
|
||||||
return msg ;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief La fonction formate en un message les parametres de la fonction
|
|
||||||
rrm_init_mr_req().
|
|
||||||
\return message formate
|
|
||||||
*/
|
|
||||||
|
|
||||||
msg_t *msg_rrci_init_mr_req(
|
|
||||||
Instance_t inst , //!< instance ID
|
|
||||||
Transaction_t Trans_id , //!< Transaction ID
|
|
||||||
const LCHAN_DESC *Lchan_desc_srb0 , //!< Logical Channel Descriptor - SRB0
|
|
||||||
const LCHAN_DESC *Lchan_desc_srb1 , //!< Logical Channel Descriptor - SRB1
|
|
||||||
unsigned char CH_index //!< index to identify the CH
|
|
||||||
)
|
|
||||||
{
|
|
||||||
msg_t *msg = RRM_CALLOC(msg_t , 1 ) ;
|
|
||||||
|
|
||||||
if ( msg != NULL ) {
|
|
||||||
rrci_init_mr_req_t *p = RRM_CALLOC(rrci_init_mr_req_t , 1 ) ;
|
|
||||||
|
|
||||||
if ( p != NULL ) {
|
|
||||||
init_rrc_msg_head(&(msg->head),inst,RRCI_INIT_MR_REQ, sizeof( rrci_init_mr_req_t ) ,Trans_id);
|
|
||||||
|
|
||||||
memcpy(&(p->Lchan_desc_srb0), Lchan_desc_srb0, sizeof(LCHAN_DESC) );
|
|
||||||
memcpy(&(p->Lchan_desc_srb1), Lchan_desc_srb1, sizeof(LCHAN_DESC) );
|
|
||||||
p->CH_index = CH_index ;
|
|
||||||
}
|
|
||||||
|
|
||||||
msg->data = (char *) p ;
|
|
||||||
}
|
|
||||||
|
|
||||||
return msg ;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief La fonction formate en un message les parametres de la fonction
|
|
||||||
rrm_init_mon_req().
|
|
||||||
\return message formate
|
|
||||||
*/
|
|
||||||
|
|
||||||
msg_t *msg_rrm_init_mon_req(
|
|
||||||
Instance_t inst , //!< instance ID
|
|
||||||
L2_ID L2_id ,
|
|
||||||
unsigned int NB_chan ,
|
|
||||||
unsigned int interval ,
|
|
||||||
unsigned int *ch_to_scan ,
|
|
||||||
Transaction_t Trans_id //!< Transaction ID
|
|
||||||
|
|
||||||
)
|
|
||||||
{
|
|
||||||
msg_t *msg = RRM_CALLOC(msg_t , 1 ) ;
|
|
||||||
|
|
||||||
if ( msg != NULL ) {
|
|
||||||
unsigned int size = sizeof( rrm_init_mon_req_t ) + (NB_chan-1) * sizeof(unsigned int) ;
|
|
||||||
|
|
||||||
rrm_init_mon_req_t *p = RRM_CALLOC2(rrm_init_mon_req_t , size ) ;
|
|
||||||
|
|
||||||
if ( p != NULL ) {
|
|
||||||
|
|
||||||
//for (int i=0; i<NB_chan; i++)
|
|
||||||
// fprintf(stdout,"msg_rrm_init_mon_req(), chan: %d\n", ch_to_scan[i]); //dbg
|
|
||||||
init_rrc_msg_head(&(msg->head),inst,RRM_INIT_MON_REQ, size ,Trans_id);
|
|
||||||
|
|
||||||
memcpy( p->L2_id.L2_id, L2_id.L2_id, sizeof(L2_ID) ) ;
|
|
||||||
p->NB_chan = NB_chan;
|
|
||||||
p->interval = interval;
|
|
||||||
|
|
||||||
if ( NB_chan != 0 )
|
|
||||||
memcpy( p->ch_to_scan, ch_to_scan, NB_chan*sizeof(unsigned int) );
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
msg->data = (char *) p ;
|
|
||||||
}
|
|
||||||
|
|
||||||
return msg ;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief La fonction formate en un message les parametres de la fonction
|
|
||||||
rrm_init_scan_req().
|
|
||||||
\return message formate
|
|
||||||
*/
|
|
||||||
|
|
||||||
msg_t *msg_rrm_init_scan_req(
|
|
||||||
Instance_t inst , //!< instance ID
|
|
||||||
unsigned int Start_fr,
|
|
||||||
unsigned int Stop_fr,
|
|
||||||
unsigned int Meas_band,
|
|
||||||
unsigned int Meas_tpf,
|
|
||||||
unsigned int Nb_channels,
|
|
||||||
unsigned int Overlap,
|
|
||||||
unsigned int Sampl_freq,
|
|
||||||
Transaction_t Trans_id //!< Transaction ID
|
|
||||||
|
|
||||||
)
|
|
||||||
{
|
|
||||||
msg_t *msg = RRM_CALLOC(msg_t , 1 ) ;
|
|
||||||
|
|
||||||
if ( msg != NULL ) {
|
|
||||||
rrm_init_scan_req_t *p = RRM_CALLOC(rrm_init_scan_req_t , 1 ) ;
|
|
||||||
|
|
||||||
if ( p != NULL ) {
|
|
||||||
init_rrc_msg_head(&(msg->head),inst,RRM_INIT_SCAN_REQ, sizeof( rrm_init_scan_req_t ) ,Trans_id);
|
|
||||||
|
|
||||||
//mod_lor_10_03_12++
|
|
||||||
p->Start_fr = Start_fr;
|
|
||||||
p->Stop_fr = Stop_fr;
|
|
||||||
p->Meas_band = Meas_band;
|
|
||||||
p->Meas_tpf = Meas_tpf;
|
|
||||||
p->Nb_channels = Nb_channels;
|
|
||||||
p->Overlap = Overlap;
|
|
||||||
p->Sampl_freq = Sampl_freq;
|
|
||||||
//mod_lor_10_03_12--
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
msg->data = (char *) p ;
|
|
||||||
}
|
|
||||||
|
|
||||||
return msg ;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief La fonction formate en un message les parametres de la fonction
|
|
||||||
rrm_end_scan_req().
|
|
||||||
\return message formate
|
|
||||||
*/
|
|
||||||
|
|
||||||
msg_t *msg_rrm_end_scan_req(
|
|
||||||
Instance_t inst,
|
|
||||||
L2_ID L2_id ,
|
|
||||||
Transaction_t Trans_id
|
|
||||||
)
|
|
||||||
{
|
|
||||||
msg_t *msg = RRM_CALLOC(msg_t , 1 ) ;
|
|
||||||
|
|
||||||
if ( msg != NULL ) {
|
|
||||||
rrm_end_scan_req_t *p = RRM_CALLOC(rrm_end_scan_req_t , 1 ) ;
|
|
||||||
|
|
||||||
if ( p != NULL ) {
|
|
||||||
init_rrc_msg_head(&(msg->head),inst,RRM_END_SCAN_REQ, sizeof( rrm_end_scan_req_t ) ,Trans_id);
|
|
||||||
memcpy( p->L2_id.L2_id, L2_id.L2_id, sizeof(L2_ID) ) ;
|
|
||||||
}
|
|
||||||
|
|
||||||
msg->data = (char *) p ;
|
|
||||||
}
|
|
||||||
|
|
||||||
return msg ;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!//add_lor_10_11_05
|
|
||||||
*******************************************************************************
|
|
||||||
\brief La fonction formate en un message les parametres de la fonction
|
|
||||||
rrm_up_freq_ass_sec().
|
|
||||||
\return message formate
|
|
||||||
*/
|
|
||||||
|
|
||||||
msg_t *msg_rrm_up_freq_ass_sec(
|
|
||||||
Instance_t inst , //!< instance ID
|
|
||||||
L2_ID *L2_id , //!< Layer 2 (MAC) ID vector of SUs starting tx
|
|
||||||
L2_ID *L2_id_dest , //!< Layer 2 (MAC) ID vector of SUs receiving tx
|
|
||||||
unsigned int NB_all , //!< Number of allocated links
|
|
||||||
CHANNEL_T *ass_channels //!< Vector of allocated links
|
|
||||||
)
|
|
||||||
|
|
||||||
{
|
|
||||||
msg_t *msg = RRM_CALLOC(msg_t , 1 ) ;
|
|
||||||
int i;
|
|
||||||
|
|
||||||
if ( msg != NULL ) {
|
|
||||||
unsigned int size = sizeof( rrm_up_freq_ass_sec_t );
|
|
||||||
//printf ("size rrm_up_freq_ass_t %d\n", size);//dbg
|
|
||||||
rrm_up_freq_ass_sec_t *p = RRM_CALLOC2( rrm_up_freq_ass_sec_t , size ) ;
|
|
||||||
|
|
||||||
|
|
||||||
if ( p != NULL ) {
|
|
||||||
|
|
||||||
|
|
||||||
init_rrc_msg_head(&(msg->head),inst,RRM_UP_FREQ_ASS_SEC, size,0);
|
|
||||||
p->NB_all = NB_all;
|
|
||||||
|
|
||||||
for (i=0; i<NB_all; i++) {
|
|
||||||
memcpy( p->L2_id[i].L2_id, L2_id[i].L2_id, sizeof(L2_ID) ) ;
|
|
||||||
memcpy( p->L2_id_dest[i].L2_id, L2_id_dest[i].L2_id, sizeof(L2_ID) ) ;
|
|
||||||
}
|
|
||||||
|
|
||||||
memcpy( p->ass_channels, ass_channels, NB_all*sizeof(CHANNEL_T) );
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
msg->data = (char *) p ;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
return msg ;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief La fonction formate en un message les parametres de la fonction
|
|
||||||
rrm_up_freq_ass().
|
|
||||||
\return message formate
|
|
||||||
*/
|
|
||||||
|
|
||||||
msg_t *msg_rrm_up_freq_ass(
|
|
||||||
Instance_t inst , //!< instance ID
|
|
||||||
L2_ID L2_id , //!< Layer 2 (MAC) ID of SU
|
|
||||||
unsigned int NB_chan ,
|
|
||||||
CHANNEL_T *ass_channels
|
|
||||||
)
|
|
||||||
|
|
||||||
{
|
|
||||||
msg_t *msg = RRM_CALLOC(msg_t , 1 ) ;
|
|
||||||
|
|
||||||
if ( msg != NULL ) {
|
|
||||||
unsigned int size = sizeof( rrm_up_freq_ass_t );// + (NB_chan-1) * sizeof(CHANNEL_T) ;//mod_lor_10_04_23
|
|
||||||
rrm_up_freq_ass_t *p = RRM_CALLOC2( rrm_up_freq_ass_t , size ) ;
|
|
||||||
|
|
||||||
|
|
||||||
if ( p != NULL ) {
|
|
||||||
|
|
||||||
|
|
||||||
init_rrc_msg_head(&(msg->head),inst,RRM_UP_FREQ_ASS, size,0);
|
|
||||||
p->NB_chan = NB_chan;
|
|
||||||
memcpy( p->L2_id.L2_id, L2_id.L2_id, sizeof(L2_ID) ) ;
|
|
||||||
memcpy( p->ass_channels, ass_channels, NB_chan*sizeof(CHANNEL_T) );
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
msg->data = (char *) p ;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
return msg ;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
///! MESSAGES SENT VIA IP
|
|
||||||
//mod_lor_10_04_27++
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief La fonction formate en un message les parametres de la fonction
|
|
||||||
update_sens_results_3().
|
|
||||||
\return message formate
|
|
||||||
*/
|
|
||||||
/*msg_t *msg_update_sens_results_3(
|
|
||||||
Instance_t inst,
|
|
||||||
L2_ID L2_id, //!< FC L2_id
|
|
||||||
unsigned int NB_info,
|
|
||||||
Sens_ch_t *Sens_meas,
|
|
||||||
Transaction_t Trans_id
|
|
||||||
)
|
|
||||||
{
|
|
||||||
msg_t *msg = RRM_CALLOC(msg_t , 1 ) ;
|
|
||||||
|
|
||||||
if ( msg != NULL )
|
|
||||||
{
|
|
||||||
unsigned int size = sizeof( rrm_update_sens_t );// + (NB_info-1) * sizeof(Sens_ch_t) ; //mod_lor_10_04_23
|
|
||||||
|
|
||||||
rrm_update_sens_t *p = RRM_CALLOC2(rrm_update_sens_t , size ) ;
|
|
||||||
|
|
||||||
if ( p != NULL )
|
|
||||||
{
|
|
||||||
//fprintf(stderr,"rrmUSR 1 \n");//dbg
|
|
||||||
init_rrc_msg_head(&(msg->head),inst, UPDATE_SENS_RESULTS_3, size ,Trans_id);
|
|
||||||
|
|
||||||
memcpy( p->L2_id.L2_id, L2_id.L2_id, sizeof(L2_ID) ) ;
|
|
||||||
|
|
||||||
p->NB_info = NB_info ;
|
|
||||||
p->info_time = 0 ;
|
|
||||||
|
|
||||||
if ( NB_info > 0 )
|
|
||||||
{
|
|
||||||
memcpy( p->Sens_meas , Sens_meas, NB_info * sizeof(Sens_ch_t) ) ;
|
|
||||||
}
|
|
||||||
//fprintf(stdout,"msg_rrm_update_sens()2 : NB_chan %d\n", p->NB_info);//dbg
|
|
||||||
//fprintf(stdout,"NB_chan %d\n", p->NB_info);
|
|
||||||
// for (int i=0; i<NB_info; i++)
|
|
||||||
// Sens_ch_t *ch = p->Sens_meas; ch!=NULL; ch=ch->next)
|
|
||||||
//fprintf(stdout,"channel in msg arr: %d\n", ch->Ch_id); //dbg
|
|
||||||
|
|
||||||
}
|
|
||||||
//fprintf(stderr,"rrmUSR end \n");//dbg
|
|
||||||
msg->data = (char *) p ;
|
|
||||||
}
|
|
||||||
|
|
||||||
return msg ;
|
|
||||||
|
|
||||||
}*/
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief La fonction formate en un message les parametres de la fonction
|
|
||||||
open_freq_query_4().
|
|
||||||
\return message formate
|
|
||||||
*//*
|
|
||||||
msg_t *msg_open_freq_query_4(
|
|
||||||
Instance_t inst,
|
|
||||||
L2_ID L2_id ,
|
|
||||||
QOS_CLASS_T QoS ,
|
|
||||||
Transaction_t Trans_id
|
|
||||||
)
|
|
||||||
{
|
|
||||||
msg_t *msg = RRM_CALLOC(msg_t , 1 ) ;
|
|
||||||
|
|
||||||
if ( msg != NULL )
|
|
||||||
{
|
|
||||||
open_freq_query_t *p = RRM_CALLOC(open_freq_query_t , 1 ) ;
|
|
||||||
|
|
||||||
if ( p != NULL )
|
|
||||||
{
|
|
||||||
init_rrc_msg_head(&(msg->head),inst,OPEN_FREQ_QUERY_4, sizeof( open_freq_query_t ) ,Trans_id);
|
|
||||||
memcpy( p->L2_id.L2_id, L2_id.L2_id, sizeof(L2_ID) ) ;
|
|
||||||
p->QoS = QoS;
|
|
||||||
}
|
|
||||||
msg->data = (char *) p ;
|
|
||||||
}
|
|
||||||
return msg ;
|
|
||||||
}*/
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief La fonction formate en un message les parametres de la fonction
|
|
||||||
rrm_open_freq().
|
|
||||||
\return message formate
|
|
||||||
*//*
|
|
||||||
msg_t *msg_update_open_freq_7(
|
|
||||||
Instance_t inst,
|
|
||||||
L2_ID L2_id ,
|
|
||||||
unsigned int NB_free_ch,
|
|
||||||
CHANNEL_T *fr_channels,
|
|
||||||
Transaction_t Trans_id
|
|
||||||
)
|
|
||||||
{
|
|
||||||
msg_t *msg = RRM_CALLOC(msg_t , 1 ) ;
|
|
||||||
|
|
||||||
if ( msg != NULL )
|
|
||||||
{
|
|
||||||
unsigned int size = sizeof( update_open_freq_t );// + (NB_free_ch-1) * sizeof(CHANNEL_T) ;//mod_lor_10_04_23
|
|
||||||
|
|
||||||
update_open_freq_t *p = RRM_CALLOC2(update_open_freq_t , size ) ;
|
|
||||||
|
|
||||||
if ( p != NULL )
|
|
||||||
{
|
|
||||||
init_rrc_msg_head(&(msg->head),inst,UPDATE_OPEN_FREQ_7, size ,Trans_id);
|
|
||||||
memcpy( p->L2_id.L2_id, L2_id.L2_id, sizeof(L2_ID) ) ;
|
|
||||||
p->NB_chan = NB_free_ch ;
|
|
||||||
|
|
||||||
if ( NB_free_ch > 0 )
|
|
||||||
{
|
|
||||||
memcpy( p->fr_channels , fr_channels, NB_free_ch * sizeof(CHANNEL_T) ) ;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
msg->data = (char *) p ;
|
|
||||||
}
|
|
||||||
return msg ;
|
|
||||||
}*/
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief La fonction formate en un message les parametres de la fonction
|
|
||||||
rrm_update_SN_freq().
|
|
||||||
\return message formate
|
|
||||||
*/
|
|
||||||
/*
|
|
||||||
msg_t *msg_update_SN_occ_freq_5(
|
|
||||||
Instance_t inst , //!< instance ID
|
|
||||||
L2_ID L2_id , //!< Layer 2 (MAC) ID of FC
|
|
||||||
unsigned int NB_chan ,
|
|
||||||
unsigned int *occ_channels ,
|
|
||||||
Transaction_t Trans_id //!< Transaction ID
|
|
||||||
)
|
|
||||||
|
|
||||||
{
|
|
||||||
msg_t *msg = RRM_CALLOC(msg_t , 1 ) ;
|
|
||||||
//fprintf(stdout,"rrc_end_scan_ord() cp1\n"); //dbg
|
|
||||||
|
|
||||||
if ( msg != NULL )
|
|
||||||
{
|
|
||||||
unsigned int size = sizeof( update_SN_occ_freq_t );// + (NB_chan-1) * sizeof(unsigned int) ;//mod_lor_10_04_23
|
|
||||||
update_SN_occ_freq_t *p = RRM_CALLOC2(update_SN_occ_freq_t , size ) ;
|
|
||||||
|
|
||||||
if ( p != NULL )
|
|
||||||
{
|
|
||||||
|
|
||||||
|
|
||||||
init_rrc_msg_head(&(msg->head),inst,UPDATE_SN_OCC_FREQ_5, size,Trans_id);
|
|
||||||
|
|
||||||
memcpy( p->L2_id.L2_id, L2_id.L2_id, sizeof(L2_ID) ) ;
|
|
||||||
|
|
||||||
|
|
||||||
p->NB_chan = NB_chan;
|
|
||||||
if ( NB_chan != 0 ){
|
|
||||||
|
|
||||||
memcpy( p->occ_channels, occ_channels, NB_chan*sizeof(unsigned int) );
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
msg->data = (char *) p ;
|
|
||||||
|
|
||||||
}
|
|
||||||
return msg ;
|
|
||||||
}
|
|
||||||
//mod_lor_10_04_27--*/
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief La fonction formate en un message les parametres de la fonction
|
|
||||||
sns_end_scan_conf(). It sends confirmation of sensing interruprion to
|
|
||||||
the RRC that will informe the fusion center about it
|
|
||||||
\return message formate
|
|
||||||
*/
|
|
||||||
msg_t * msg_rrm_end_scan_conf(
|
|
||||||
Instance_t inst , //!< instance ID
|
|
||||||
Transaction_t Trans_id //!< Transaction ID
|
|
||||||
)
|
|
||||||
{
|
|
||||||
return msg_rrm_generic_resp( inst,RRM_END_SCAN_CONF, Trans_id) ;
|
|
||||||
}
|
|
||||||
@@ -1,206 +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 rrm_2_rrc_msg.c
|
|
||||||
|
|
||||||
\brief Fonctions permettant le formattage des donnees pour l'envoi d'un
|
|
||||||
message sur le socket entre le RRC et le RRM
|
|
||||||
|
|
||||||
\author BURLOT Pascal
|
|
||||||
|
|
||||||
\date 16/07/08
|
|
||||||
|
|
||||||
|
|
||||||
\par Historique:
|
|
||||||
P.BURLOT 2009-01-20
|
|
||||||
+ L2_id: ajout de memcpy() dans msg_rrci_cx_establish_resp()
|
|
||||||
|
|
||||||
L. IACOBELLI 2010-01-05
|
|
||||||
+ new messages for sensing
|
|
||||||
+ messages sent via ip
|
|
||||||
|
|
||||||
*******************************************************************************
|
|
||||||
*/
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <errno.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <unistd.h>
|
|
||||||
|
|
||||||
#include <sys/socket.h>
|
|
||||||
#include <sys/un.h>
|
|
||||||
|
|
||||||
#include "L3_rrc_defs.h"
|
|
||||||
//#include "rrm_sock.h"
|
|
||||||
//#include "L3_rrc_interface.h"
|
|
||||||
#include "sensing_rrm_msg.h"
|
|
||||||
#include "rrm_util.h"
|
|
||||||
|
|
||||||
#ifdef TRACE
|
|
||||||
//! Macro creant la chaine a partir du nom de la variable
|
|
||||||
#define STRINGIZER(x) #x
|
|
||||||
//! Tableau pour le mode trace faisant la translation entre le numero et le nom du message
|
|
||||||
const char *Str_msg_sns_rrm[NB_MSG_SNS_RRM] = {
|
|
||||||
STRINGIZER(SNS_UPDATE_SENS ),
|
|
||||||
STRINGIZER(RRM_SCAN_ORD ),
|
|
||||||
STRINGIZER(RRM_END_SCAN_ORD ),
|
|
||||||
STRINGIZER(SNS_END_SCAN_CONF )
|
|
||||||
} ;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief This function initialize the message header
|
|
||||||
\return any return value
|
|
||||||
*/
|
|
||||||
static void init_sensing_msg_head(
|
|
||||||
msg_head_t *msg_head , //!< message header to initialize
|
|
||||||
Instance_t inst , //!< instance ID
|
|
||||||
MSG_SENSING_RRM_T msg_type , //!< type of message to initialize
|
|
||||||
unsigned int size , //!< size of message
|
|
||||||
Transaction_t Trans_id //!< transaction id associated to this message
|
|
||||||
)
|
|
||||||
{
|
|
||||||
if ( msg_head != NULL ) {
|
|
||||||
msg_head->start = START_MSG ;
|
|
||||||
msg_head->msg_type = 0xFF & msg_type ;
|
|
||||||
msg_head->inst = inst ;
|
|
||||||
msg_head->Trans_id = Trans_id ;
|
|
||||||
msg_head->size = size;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief La fonction formate en un message les parametres de la fonction
|
|
||||||
rrm_scan_ord().
|
|
||||||
\return message formate
|
|
||||||
*/
|
|
||||||
|
|
||||||
msg_t *msg_rrm_scan_ord(
|
|
||||||
Instance_t inst , ///< instance ID
|
|
||||||
unsigned int NB_chan , ///< Number of channels to sens
|
|
||||||
unsigned int Meas_tpf , ///< time on each carrier //mod_lor_10_02_19
|
|
||||||
unsigned int Overlap , ///< overlap factor (percentage) //mod_lor_10_02_19
|
|
||||||
unsigned int Sampl_nb , ///< number of samples per sub-band //mod_lor_10_04_01
|
|
||||||
Sens_ch_t *ch_to_scan , ///< Vector of channels to scan //mod_lor_10_02_19
|
|
||||||
Transaction_t Trans_id ///< Transaction ID
|
|
||||||
|
|
||||||
)
|
|
||||||
{
|
|
||||||
msg_t *msg = RRM_CALLOC(msg_t , 1 ) ;
|
|
||||||
|
|
||||||
if ( msg != NULL ) {
|
|
||||||
unsigned int size;
|
|
||||||
/*if ( NB_chan != 0 ){
|
|
||||||
size = sizeof( rrm_scan_ord_t ) + (NB_chan-1) * sizeof(unsigned int) ;
|
|
||||||
|
|
||||||
}else*/
|
|
||||||
size = sizeof( rrm_scan_ord_t );
|
|
||||||
rrm_scan_ord_t *p = RRM_CALLOC2(rrm_scan_ord_t , size ) ;
|
|
||||||
|
|
||||||
|
|
||||||
if ( p != NULL ) {
|
|
||||||
init_sensing_msg_head(&(msg->head),inst,RRM_SCAN_ORD, size ,Trans_id);
|
|
||||||
|
|
||||||
p->Meas_tpf = Meas_tpf; //mod_lor_10_02_19
|
|
||||||
p->Overlap = Overlap; //mod_lor_10_02_19
|
|
||||||
p->Sampl_nb = Sampl_nb; //mod_lor_10_02_19
|
|
||||||
p->NB_chan = NB_chan;
|
|
||||||
|
|
||||||
|
|
||||||
if ( NB_chan != 0 ) {
|
|
||||||
|
|
||||||
memcpy( p->ch_to_scan, ch_to_scan, NB_chan*sizeof(Sens_ch_t) );
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
for (int i=0; i<NB_chan; i++)
|
|
||||||
printf("scan_ord i :%d, start %d, end %d sampl %d\n",i,p->ch_to_scan[i].Start_f,p->ch_to_scan[i].Final_f,Sampl_nb);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
msg->data = (char *) p ;
|
|
||||||
}
|
|
||||||
|
|
||||||
return msg ;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief La fonction formate en un message les parametres de la fonction
|
|
||||||
rrm_end_scan_ord().
|
|
||||||
\return message formate
|
|
||||||
*/
|
|
||||||
|
|
||||||
msg_t *msg_rrm_end_scan_ord(
|
|
||||||
Instance_t inst , //!< instance ID
|
|
||||||
unsigned int NB_chan ,
|
|
||||||
unsigned int *channels ,
|
|
||||||
Transaction_t Trans_id //!< Transaction ID
|
|
||||||
)
|
|
||||||
|
|
||||||
{
|
|
||||||
msg_t *msg = RRM_CALLOC(msg_t , 1 ) ;
|
|
||||||
//fprintf(stdout,"rrc_end_scan_ord() cp1\n"); //dbg
|
|
||||||
|
|
||||||
if ( msg != NULL ) {
|
|
||||||
unsigned int size = sizeof( rrm_end_scan_ord_t ); //+ (NB_chan-1) * sizeof(unsigned int) ;
|
|
||||||
rrm_end_scan_ord_t *p = RRM_CALLOC2(rrm_end_scan_ord_t , size ) ;
|
|
||||||
|
|
||||||
if ( p != NULL ) {
|
|
||||||
|
|
||||||
|
|
||||||
init_sensing_msg_head(&(msg->head),inst,RRM_END_SCAN_ORD, size,Trans_id);
|
|
||||||
|
|
||||||
|
|
||||||
p->NB_chan = NB_chan;
|
|
||||||
|
|
||||||
if ( NB_chan != 0 ) {
|
|
||||||
|
|
||||||
memcpy( p->channels, channels, NB_chan*sizeof(unsigned int) );
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
msg->data = (char *) p ;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
return msg ;
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
killall emul_int
|
|
||||||
killall rrm
|
|
||||||
|
|
||||||
xterm -T CMM -hold -e ./emul_int &
|
|
||||||
sleep 2
|
|
||||||
./rrm -i 5 #2> log.txt
|
|
||||||
#sleep 1
|
|
||||||
#./emul_int
|
|
||||||
|
|
||||||
@@ -1,16 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
killall emul_int
|
|
||||||
killall graph
|
|
||||||
killall rrm
|
|
||||||
|
|
||||||
xterm -T COMMAND_CONSOLE -bg '#000000' -fg '#00ff00' -hold -e ./emul_int &
|
|
||||||
|
|
||||||
sleep 2
|
|
||||||
|
|
||||||
#xterm -T RRM1 -hold -e
|
|
||||||
./rrm -i 1 #2> log.txt
|
|
||||||
|
|
||||||
#sleep 1
|
|
||||||
#./emul_int &
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
killall emul_int
|
|
||||||
killall graph
|
|
||||||
killall rrm
|
|
||||||
|
|
||||||
xterm -T COMMAND_CONSOLE -bg '#000000' -fg '#00ff00' -hold -e ./emul_int &
|
|
||||||
sleep 2
|
|
||||||
./rrm -i 4 #2> log.txt
|
|
||||||
#sleep 1
|
|
||||||
#./emul_int
|
|
||||||
|
|
||||||
@@ -1,16 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
killall emul_int
|
|
||||||
killall graph
|
|
||||||
killall rrm
|
|
||||||
|
|
||||||
xterm -T COMMAND_CONSOLE -bg '#000000' -fg '#00ff00' -hold -e ./emul_int &
|
|
||||||
|
|
||||||
sleep 2
|
|
||||||
|
|
||||||
#xterm -T RRM1 -hold -e
|
|
||||||
./rrm -i 7 #2> log.txt
|
|
||||||
|
|
||||||
#sleep 1
|
|
||||||
#./emul_int &
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1,226 +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 rrm_constant.c
|
|
||||||
|
|
||||||
\brief Il contient les declarations des constantes et tables relative aux
|
|
||||||
fonctions du RRM (Radio Resource Management ).
|
|
||||||
|
|
||||||
\author BURLOT Pascal
|
|
||||||
|
|
||||||
\date 17/07/08
|
|
||||||
|
|
||||||
|
|
||||||
\par Historique:
|
|
||||||
$Author$ $Date$ $Revision$
|
|
||||||
$Id$
|
|
||||||
$Log$
|
|
||||||
|
|
||||||
*******************************************************************************
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "L3_rrc_defs.h"
|
|
||||||
|
|
||||||
#include "rrm_constant.h"
|
|
||||||
|
|
||||||
#ifdef OPENAIR2
|
|
||||||
#include "platform_constants.h"
|
|
||||||
#else
|
|
||||||
|
|
||||||
//Always synchronize with value in openair2/LAYER2/MAC/defs.h
|
|
||||||
#define BCCH_PAYLOAD_SIZE_MAX 20
|
|
||||||
#define CCCH_PAYLOAD_SIZE_MAX 28
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*! \todo a definir les valeurs par defaut */
|
|
||||||
|
|
||||||
//! \brief descripteur de canal logique en fonction de la QoS
|
|
||||||
const LCHAN_DESC Lchan_desc[MAX_QOS_CLASS] = {
|
|
||||||
// Transport Max Guaranteed Max Delay Target LCHAN_t
|
|
||||||
// Block Transport Bit Bit Class BLER
|
|
||||||
// size Blocks Rate Rate
|
|
||||||
{ BCCH_PAYLOAD_SIZE_MAX, 15, 64, 128, 1, 0, LCHAN_BCCH }, // SRB0
|
|
||||||
{ CCCH_PAYLOAD_SIZE_MAX, 15, 64, 128, 1, 0, LCHAN_CCCH }, // SRB1
|
|
||||||
{ 30, 20, 64, 128, 1, 0, LCHAN_DCCH }, // SRB2
|
|
||||||
{ 52, 20, 64, 128, 1, 0, LCHAN_DTCH_B }, // DTCH_B
|
|
||||||
{ 52, 20, 64, 128, 1, 0, LCHAN_DTCH },
|
|
||||||
{ 52, 20, 64, 128, 1, 0, LCHAN_DTCH },
|
|
||||||
{ 52, 20, 64, 128, 1, 0, LCHAN_DTCH },
|
|
||||||
{ 52, 20, 64, 128, 1, 0, LCHAN_DTCH },
|
|
||||||
{ 52, 20, 64, 128, 1, 0, LCHAN_DTCH },
|
|
||||||
{ 52, 20, 64, 128, 1, 0, LCHAN_DTCH },
|
|
||||||
};
|
|
||||||
|
|
||||||
//! \brief descripteur de la confiuration des mesures en fonction de la QoS
|
|
||||||
const MAC_RLC_MEAS_DESC Mac_rlc_meas_desc[MAX_QOS_CLASS] = {
|
|
||||||
/* 0 : QOS_CLASS = SRB0 */
|
|
||||||
{
|
|
||||||
.Meas_trigger={
|
|
||||||
.Rssi=0,.Sinr={0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
|
|
||||||
.Harq_delay=0,.Bler=0,.Spec_eff=0, .Qdepth = 0
|
|
||||||
} ,
|
|
||||||
.Mac_avg={
|
|
||||||
.Rssi_forgetting_factor=0,.Sinr_forgetting_factor=0,
|
|
||||||
.Harq_delay_forgetting_factor=0,.Bler_forgetting_factor=0,
|
|
||||||
.Spec_eff_forgetting_factor=0
|
|
||||||
} ,
|
|
||||||
.bo_forgetting_factor=0, .sdu_loss_trigger=0, .Rep_amount=0, .Rep_interval=0
|
|
||||||
},
|
|
||||||
/* 1 : QOS_CLASS = SRB1 */
|
|
||||||
{
|
|
||||||
.Meas_trigger={
|
|
||||||
.Rssi=0,.Sinr={0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
|
|
||||||
.Harq_delay=0,.Bler=0,.Spec_eff=0, .Qdepth = 0
|
|
||||||
} ,
|
|
||||||
.Mac_avg={
|
|
||||||
.Rssi_forgetting_factor=0,.Sinr_forgetting_factor=0,
|
|
||||||
.Harq_delay_forgetting_factor=0,.Bler_forgetting_factor=0,
|
|
||||||
.Spec_eff_forgetting_factor=0
|
|
||||||
} ,
|
|
||||||
.bo_forgetting_factor=0, .sdu_loss_trigger=0, .Rep_amount=0, .Rep_interval=0
|
|
||||||
},
|
|
||||||
/* 2 : QOS_CLASS = SRB2 */
|
|
||||||
{
|
|
||||||
.Meas_trigger={
|
|
||||||
.Rssi=0,.Sinr={0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
|
|
||||||
.Harq_delay=0,.Bler=0,.Spec_eff=0, .Qdepth = 0
|
|
||||||
} ,
|
|
||||||
.Mac_avg={
|
|
||||||
.Rssi_forgetting_factor=0,.Sinr_forgetting_factor=0,
|
|
||||||
.Harq_delay_forgetting_factor=0,.Bler_forgetting_factor=0,
|
|
||||||
.Spec_eff_forgetting_factor=0
|
|
||||||
} ,
|
|
||||||
.bo_forgetting_factor=0, .sdu_loss_trigger=0, .Rep_amount=0, .Rep_interval=0
|
|
||||||
},
|
|
||||||
/* 3 : QOS_CLASS = DTCH_B */
|
|
||||||
{
|
|
||||||
.Meas_trigger={
|
|
||||||
.Rssi=0,.Sinr={0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
|
|
||||||
.Harq_delay=0,.Bler=0,.Spec_eff=0, .Qdepth = 0
|
|
||||||
} ,
|
|
||||||
.Mac_avg={
|
|
||||||
.Rssi_forgetting_factor=0,.Sinr_forgetting_factor=0,
|
|
||||||
.Harq_delay_forgetting_factor=0,.Bler_forgetting_factor=0,
|
|
||||||
.Spec_eff_forgetting_factor=0
|
|
||||||
} ,
|
|
||||||
.bo_forgetting_factor=0, .sdu_loss_trigger=0, .Rep_amount=0, .Rep_interval=0
|
|
||||||
},
|
|
||||||
/* 4 : QOS_CLASS */
|
|
||||||
{
|
|
||||||
.Meas_trigger={
|
|
||||||
.Rssi=0,.Sinr={0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
|
|
||||||
.Harq_delay=0,.Bler=0,.Spec_eff=0, .Qdepth = 0
|
|
||||||
} ,
|
|
||||||
.Mac_avg={
|
|
||||||
.Rssi_forgetting_factor=0,.Sinr_forgetting_factor=0,
|
|
||||||
.Harq_delay_forgetting_factor=0,.Bler_forgetting_factor=0,
|
|
||||||
.Spec_eff_forgetting_factor=0
|
|
||||||
} ,
|
|
||||||
.bo_forgetting_factor=0, .sdu_loss_trigger=0, .Rep_amount=0, .Rep_interval=0
|
|
||||||
},
|
|
||||||
/* 5 : QOS_CLASS = CSCH */
|
|
||||||
{
|
|
||||||
.Meas_trigger={
|
|
||||||
.Rssi=0,.Sinr={0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
|
|
||||||
.Harq_delay=0,.Bler=0,.Spec_eff=0, .Qdepth = 0
|
|
||||||
} ,
|
|
||||||
.Mac_avg={
|
|
||||||
.Rssi_forgetting_factor=0,.Sinr_forgetting_factor=0,
|
|
||||||
.Harq_delay_forgetting_factor=0,.Bler_forgetting_factor=0,
|
|
||||||
.Spec_eff_forgetting_factor=0
|
|
||||||
} ,
|
|
||||||
.bo_forgetting_factor=0, .sdu_loss_trigger=0, .Rep_amount=0, .Rep_interval=0
|
|
||||||
},
|
|
||||||
/* 6 : QOS_CLASS = CPCH */
|
|
||||||
{
|
|
||||||
.Meas_trigger={
|
|
||||||
.Rssi=0,.Sinr={0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
|
|
||||||
.Harq_delay=0,.Bler=0,.Spec_eff=0, .Qdepth = 0
|
|
||||||
} ,
|
|
||||||
.Mac_avg={
|
|
||||||
.Rssi_forgetting_factor=0,.Sinr_forgetting_factor=0,
|
|
||||||
.Harq_delay_forgetting_factor=0,.Bler_forgetting_factor=0,
|
|
||||||
.Spec_eff_forgetting_factor=0
|
|
||||||
} ,
|
|
||||||
.bo_forgetting_factor=0, .sdu_loss_trigger=0, .Rep_amount=0, .Rep_interval=0
|
|
||||||
},
|
|
||||||
/* 7 : QOS_CLASS */
|
|
||||||
{
|
|
||||||
.Meas_trigger={
|
|
||||||
.Rssi=0,.Sinr={0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
|
|
||||||
.Harq_delay=0,.Bler=0,.Spec_eff=0, .Qdepth = 0
|
|
||||||
} ,
|
|
||||||
.Mac_avg={
|
|
||||||
.Rssi_forgetting_factor=0,.Sinr_forgetting_factor=0,
|
|
||||||
.Harq_delay_forgetting_factor=0,.Bler_forgetting_factor=0,
|
|
||||||
.Spec_eff_forgetting_factor=0
|
|
||||||
} ,
|
|
||||||
.bo_forgetting_factor=0, .sdu_loss_trigger=0, .Rep_amount=0, .Rep_interval=0
|
|
||||||
},
|
|
||||||
/* 8 : QOS_CLASS */
|
|
||||||
{
|
|
||||||
.Meas_trigger={
|
|
||||||
.Rssi=0,.Sinr={0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
|
|
||||||
.Harq_delay=0,.Bler=0,.Spec_eff=0, .Qdepth = 0
|
|
||||||
} ,
|
|
||||||
.Mac_avg={
|
|
||||||
.Rssi_forgetting_factor=0,.Sinr_forgetting_factor=0,
|
|
||||||
.Harq_delay_forgetting_factor=0,.Bler_forgetting_factor=0,
|
|
||||||
.Spec_eff_forgetting_factor=0
|
|
||||||
} ,
|
|
||||||
.bo_forgetting_factor=0, .sdu_loss_trigger=0, .Rep_amount=0, .Rep_interval=0
|
|
||||||
},
|
|
||||||
/* 9 : QOS_CLASS */
|
|
||||||
{
|
|
||||||
.Meas_trigger={
|
|
||||||
.Rssi=0,.Sinr={0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
|
|
||||||
.Harq_delay=0,.Bler=0,.Spec_eff=0, .Qdepth = 0
|
|
||||||
} ,
|
|
||||||
.Mac_avg={
|
|
||||||
.Rssi_forgetting_factor=0,.Sinr_forgetting_factor=0,
|
|
||||||
.Harq_delay_forgetting_factor=0,.Bler_forgetting_factor=0,
|
|
||||||
.Spec_eff_forgetting_factor=0
|
|
||||||
} ,
|
|
||||||
.bo_forgetting_factor=0, .sdu_loss_trigger=0, .Rep_amount=0, .Rep_interval=0
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
//! \brief descripteur de la configuration des mesures de voisinage
|
|
||||||
const SENSING_MEAS_DESC Sensing_meas_desc = {
|
|
||||||
// RSSI_Threshold RSSI_F_Factor Rep_interval
|
|
||||||
0, 0, 0
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -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 rrm_constant.h
|
|
||||||
|
|
||||||
\brief Fichier d'entete contenant les declarations des types, des defines ,
|
|
||||||
et des fonctions relatives aux constantes du RRM
|
|
||||||
(Radio Resource Management ).
|
|
||||||
|
|
||||||
\author BURLOT Pascal
|
|
||||||
|
|
||||||
\date 15/07/08
|
|
||||||
|
|
||||||
|
|
||||||
\par Historique:
|
|
||||||
$Author$ $Date$ $Revision$
|
|
||||||
$Id$
|
|
||||||
$Log$
|
|
||||||
|
|
||||||
*******************************************************************************
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef RRM_CONSTANT_H
|
|
||||||
#define RRM_CONSTANT_H
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
//! Index QoS pour le radio Bearer SRB0
|
|
||||||
#define QOS_SRB0 0
|
|
||||||
//! Index QoS pour le radio Bearer SRB1
|
|
||||||
#define QOS_SRB1 1
|
|
||||||
//! Index QoS pour le radio Bearer SRB2
|
|
||||||
#define QOS_SRB2 2
|
|
||||||
//! Index QoS pour le radio Bearer DTCH_B
|
|
||||||
#define QOS_DTCH_B 3
|
|
||||||
//! Index QoS pour le radio Bearer DTCH_D
|
|
||||||
#define QOS_DTCH_D 4
|
|
||||||
//! Index QoS pour le radio Bearer DTCH_USER1
|
|
||||||
#define QOS_DTCH_USER1 5
|
|
||||||
//! Index QoS pour le radio Bearer DTCH_USER2
|
|
||||||
#define QOS_DTCH_USER2 6
|
|
||||||
//! Index QoS pour le radio Bearer DTCH_USER3
|
|
||||||
#define QOS_DTCH_USER3 7
|
|
||||||
//! Index QoS pour le radio Bearer DTCH_USER4
|
|
||||||
#define QOS_DTCH_USER4 8
|
|
||||||
//! Index QoS pour le radio Bearer DTCH_USER5
|
|
||||||
#define QOS_DTCH_USER5 9
|
|
||||||
//! Nombre d'index de QoS
|
|
||||||
#define MAX_QOS_CLASS 10
|
|
||||||
|
|
||||||
|
|
||||||
extern const LCHAN_DESC Lchan_desc[MAX_QOS_CLASS] ;
|
|
||||||
extern const MAC_RLC_MEAS_DESC Mac_rlc_meas_desc[MAX_QOS_CLASS] ;
|
|
||||||
extern const SENSING_MEAS_DESC Sensing_meas_desc ;
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif /* RRM_CONSTANT_H */
|
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -1,436 +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 rrm_sock.c
|
|
||||||
|
|
||||||
\brief RRM (Radio Ressource Manager ) Socket
|
|
||||||
|
|
||||||
Ceux sont les fonctions relatives à la communication avec les
|
|
||||||
autres entites:
|
|
||||||
- RRC ,
|
|
||||||
- CMM ,
|
|
||||||
- PUSU
|
|
||||||
|
|
||||||
\author BURLOT Pascal
|
|
||||||
|
|
||||||
\date 10/07/08
|
|
||||||
|
|
||||||
|
|
||||||
\par Historique:
|
|
||||||
$Author$ $Date$ $Revision$
|
|
||||||
$Id$
|
|
||||||
$Log$
|
|
||||||
|
|
||||||
*******************************************************************************
|
|
||||||
*/
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <errno.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <unistd.h>
|
|
||||||
|
|
||||||
|
|
||||||
#include "debug.h"
|
|
||||||
#include "L3_rrc_defs.h"
|
|
||||||
#include "rrm_util.h"
|
|
||||||
#include "rrm_sock.h"
|
|
||||||
|
|
||||||
//! \brief Taille maximale de la charge utile
|
|
||||||
#define SIZE_MAX_PAYLOAD 16384 //mod_lor_10_05_24
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#include <sys/socket.h>
|
|
||||||
#include <netinet/in.h> //mod_lor_10_01_25
|
|
||||||
#include <arpa/inet.h> //mod_lor_10_01_25
|
|
||||||
#include <sys/un.h>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief This function opens a unix socket for the rrm communication
|
|
||||||
( no-connected mode / UDP DATAGRAM )
|
|
||||||
\return The return value is a socket handle
|
|
||||||
*/
|
|
||||||
int open_socket(
|
|
||||||
sock_rrm_t *s , ///< socket descriptor
|
|
||||||
char *path_local, ///< local socket path if unix socket
|
|
||||||
char *path_dest , ///< host Socket path if unix socket
|
|
||||||
int rrm_inst ///< instance of the rrm entity
|
|
||||||
)
|
|
||||||
{
|
|
||||||
/* Unix socket */
|
|
||||||
int socket_fd ;
|
|
||||||
int len ;
|
|
||||||
|
|
||||||
if ((socket_fd = socket(AF_UNIX, SOCK_DGRAM, 0)) == -1) {
|
|
||||||
perror("unix socket");
|
|
||||||
return -1 ;
|
|
||||||
}
|
|
||||||
|
|
||||||
memset(&(s->un_local_addr), 0, sizeof(struct sockaddr_un));
|
|
||||||
s->un_local_addr.sun_family = AF_UNIX;
|
|
||||||
sprintf(s->un_local_addr.sun_path,"%s%d", path_local, rrm_inst );
|
|
||||||
unlink(s->un_local_addr.sun_path);
|
|
||||||
|
|
||||||
len = strlen((s->un_local_addr).sun_path) + sizeof((s->un_local_addr).sun_family);
|
|
||||||
|
|
||||||
if (bind(socket_fd, (struct sockaddr *)&(s->un_local_addr), len) == -1) {
|
|
||||||
perror("bind");
|
|
||||||
return -1 ;
|
|
||||||
}
|
|
||||||
|
|
||||||
memset(&(s->un_dest_addr), 0, sizeof(struct sockaddr_un));
|
|
||||||
s->un_dest_addr.sun_family = AF_UNIX;
|
|
||||||
sprintf(s->un_dest_addr.sun_path,"%s%d", path_dest, rrm_inst );
|
|
||||||
|
|
||||||
s->s = socket_fd ;
|
|
||||||
return socket_fd ;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief This function closes a RRM socket
|
|
||||||
\return none
|
|
||||||
*/
|
|
||||||
void close_socket(
|
|
||||||
sock_rrm_t *sock ///< the socket handle
|
|
||||||
)
|
|
||||||
{
|
|
||||||
shutdown(sock->s, SHUT_RDWR);
|
|
||||||
close(sock->s);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief This function send a buffer message to the unix socket
|
|
||||||
\return if OK then "0" is returned else "-1"
|
|
||||||
*/
|
|
||||||
int send_msg(
|
|
||||||
sock_rrm_t *s ,///< socket descriptor
|
|
||||||
msg_t *msg ///< the message to send
|
|
||||||
)
|
|
||||||
{
|
|
||||||
/* Unix socket */
|
|
||||||
int ret = 0 ;
|
|
||||||
char *buf = NULL;
|
|
||||||
struct msghdr msghd ;
|
|
||||||
struct iovec iov;
|
|
||||||
int taille = sizeof(msg_head_t) ;
|
|
||||||
|
|
||||||
if ( msg == NULL )
|
|
||||||
return -1 ;
|
|
||||||
|
|
||||||
if ( msg->data != NULL )
|
|
||||||
taille += msg->head.size ;
|
|
||||||
|
|
||||||
buf = RRM_MALLOC(char, taille);
|
|
||||||
|
|
||||||
if (buf ==NULL)
|
|
||||||
ret = -1 ;
|
|
||||||
else {
|
|
||||||
memcpy( buf , &(msg->head) , sizeof(msg_head_t) ) ;
|
|
||||||
memcpy( buf+sizeof(msg_head_t), msg->data, msg->head.size ) ;
|
|
||||||
|
|
||||||
iov.iov_base = (void *)buf;
|
|
||||||
iov.iov_len = taille ;
|
|
||||||
|
|
||||||
msghd.msg_name = (void *)&(s->un_dest_addr);
|
|
||||||
msghd.msg_namelen = sizeof(s->un_dest_addr);
|
|
||||||
msghd.msg_iov = &iov;
|
|
||||||
msghd.msg_iovlen = 1;
|
|
||||||
msghd.msg_control = NULL ;
|
|
||||||
msghd.msg_controllen = 0 ;
|
|
||||||
|
|
||||||
if ( sendmsg(s->s, &msghd, 0) < 0 ) {
|
|
||||||
ret = -1;
|
|
||||||
perror("sendmsg:unix socket unix");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
RRM_FREE(buf) ;
|
|
||||||
RRM_FREE(msg->data) ;
|
|
||||||
RRM_FREE(msg) ;
|
|
||||||
|
|
||||||
return ret ;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief This function read a buffer from a unix socket
|
|
||||||
\return the function returns a message pointer. If the pointeur is NULL, a error
|
|
||||||
is happened.
|
|
||||||
*/
|
|
||||||
char *recv_msg(
|
|
||||||
sock_rrm_t *s ///< socket descriptor
|
|
||||||
)
|
|
||||||
{
|
|
||||||
/* Unix socket */
|
|
||||||
char *buf = NULL;
|
|
||||||
char *msg = NULL;
|
|
||||||
struct msghdr msghd ;
|
|
||||||
struct iovec iov;
|
|
||||||
int size_msg ;
|
|
||||||
msg_head_t *head ;
|
|
||||||
int ret ;
|
|
||||||
|
|
||||||
int taille = SIZE_MAX_PAYLOAD ;
|
|
||||||
|
|
||||||
buf = RRM_CALLOC( char,taille);
|
|
||||||
|
|
||||||
if ( buf == NULL ) {
|
|
||||||
fprintf(stderr,"error recvmsg_un: 0x%02x\n", msghd.msg_flags) ;
|
|
||||||
return NULL ;
|
|
||||||
}
|
|
||||||
|
|
||||||
iov.iov_base = (void *)buf;
|
|
||||||
iov.iov_len = taille ;
|
|
||||||
msghd.msg_name = (void *)&(s->un_dest_addr);
|
|
||||||
msghd.msg_namelen = sizeof(s->un_dest_addr);
|
|
||||||
msghd.msg_iov = &iov;
|
|
||||||
msghd.msg_iovlen = 1;
|
|
||||||
msghd.msg_control = NULL ;
|
|
||||||
msghd.msg_controllen= 0 ;
|
|
||||||
|
|
||||||
ret = recvmsg(s->s, &msghd , 0 ) ;
|
|
||||||
|
|
||||||
if ( ret <= 0 ) {
|
|
||||||
perror("PB recvmsg_un");
|
|
||||||
RRM_FREE(buf);
|
|
||||||
return NULL ;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (msghd.msg_flags != 0 ) {
|
|
||||||
fprintf(stderr,"error recvmsg_un: 0x%02x\n", msghd.msg_flags) ;
|
|
||||||
RRM_FREE(buf);
|
|
||||||
return NULL ;
|
|
||||||
}
|
|
||||||
|
|
||||||
head = (msg_head_t *) buf ;
|
|
||||||
size_msg = sizeof(msg_head_t) + head->size ;
|
|
||||||
|
|
||||||
msg = RRM_CALLOC(char , size_msg ) ;
|
|
||||||
|
|
||||||
if ( msg != NULL )
|
|
||||||
memcpy( msg , buf , size_msg ) ;
|
|
||||||
|
|
||||||
RRM_FREE( buf ) ;
|
|
||||||
|
|
||||||
return msg ;
|
|
||||||
}
|
|
||||||
|
|
||||||
//mod_lor_10_01_25++
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief This function opens a internet socket for the rrm communication
|
|
||||||
( no-connected mode / UDP DATAGRAM ) -> considered address: IPv4
|
|
||||||
\return The return value is a socket handle
|
|
||||||
*/
|
|
||||||
int open_socket_int(
|
|
||||||
sock_rrm_int_t *s, ///< socket descriptor
|
|
||||||
unsigned char *path_local , ///< local socket path if internet socket
|
|
||||||
int local_port, ///< local socket port if internet socket
|
|
||||||
unsigned char *path_dest , ///< dest socket path if internet socket
|
|
||||||
int dest_port, ///< dest socket port if internet socket
|
|
||||||
int rrm_inst ///< instance of the rrm entity
|
|
||||||
)
|
|
||||||
{
|
|
||||||
/* Internet socket */
|
|
||||||
int socket_fd ;
|
|
||||||
int len ;
|
|
||||||
unsigned long int tmp;
|
|
||||||
unsigned char local_test [4];
|
|
||||||
|
|
||||||
if (path_local == NULL)
|
|
||||||
fprintf(stderr,"path_local = NULL\n ");//dbg
|
|
||||||
|
|
||||||
|
|
||||||
if ((socket_fd = socket(AF_INET, SOCK_DGRAM, 0)) == -1) {
|
|
||||||
perror("internet socket");
|
|
||||||
return -1 ;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
//!Setting local address
|
|
||||||
memset(&(s->in_local_addr), 0, sizeof(struct sockaddr_in));
|
|
||||||
s->in_local_addr.sin_family = AF_INET;
|
|
||||||
s->in_local_addr.sin_port = htons(local_port);
|
|
||||||
memcpy(&tmp,path_local,4);
|
|
||||||
//fprintf(stderr,"\nOpen sock: path_local %X \n", tmp);//dbg
|
|
||||||
s->in_local_addr.sin_addr.s_addr = tmp;
|
|
||||||
|
|
||||||
|
|
||||||
len = sizeof(s->in_local_addr);
|
|
||||||
|
|
||||||
if (bind(socket_fd, (struct sockaddr *)&(s->in_local_addr), len) == -1) {
|
|
||||||
perror("bind internet");
|
|
||||||
return -1 ;
|
|
||||||
}
|
|
||||||
|
|
||||||
//!Setting destination address
|
|
||||||
memset(&(s->in_dest_addr), 0, sizeof(struct sockaddr_in));
|
|
||||||
s->in_dest_addr.sin_family = AF_INET;
|
|
||||||
s->in_dest_addr.sin_port = htons(7000);
|
|
||||||
memcpy(&tmp,path_dest,4);
|
|
||||||
//fprintf(stderr,"Open sock: path_dest %X \n", tmp);//dbg
|
|
||||||
s->in_dest_addr.sin_addr.s_addr = tmp;
|
|
||||||
|
|
||||||
s->s = socket_fd ;
|
|
||||||
//fprintf(stderr,"IP address %X \n", s->in_local_addr.sin_addr.s_addr);//dbg
|
|
||||||
// fprintf(stderr,"IP dest %X \n", s->in_dest_addr.sin_addr.s_addr);//dbg
|
|
||||||
return socket_fd ;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief This function read a buffer from a internet socket
|
|
||||||
\return the function returns a message pointer. If the pointeur is NULL, a error
|
|
||||||
is happened.
|
|
||||||
*/
|
|
||||||
char *recv_msg_int(
|
|
||||||
sock_rrm_int_t *s ///< socket descriptor
|
|
||||||
)
|
|
||||||
{
|
|
||||||
/* Internet socket */
|
|
||||||
char *buf = NULL;
|
|
||||||
char *msg = NULL;
|
|
||||||
int size_msg ;
|
|
||||||
msg_head_t *head ;
|
|
||||||
int ret ;
|
|
||||||
//struct sockaddr_in newS;
|
|
||||||
//socklen_t len_addr = sizeof(struct sockaddr_in);
|
|
||||||
|
|
||||||
int taille = SIZE_MAX_PAYLOAD ;
|
|
||||||
//fprintf(stderr,"RF dentro recv_from \n ");//dbg
|
|
||||||
|
|
||||||
buf = RRM_CALLOC( char,taille);
|
|
||||||
|
|
||||||
if ( buf == NULL ) {
|
|
||||||
return NULL ;
|
|
||||||
}
|
|
||||||
|
|
||||||
//fprintf(stderr,"RF s: %d\n ", s->s);//dbg
|
|
||||||
|
|
||||||
|
|
||||||
//ret = recvfrom(s->s, buf, taille, 0,(struct sockaddr *)&(newS), &len_addr) ;
|
|
||||||
ret = recvfrom(s->s, buf, taille, 0,NULL, 0) ; //mod_lor_10_04_23
|
|
||||||
|
|
||||||
//fprintf(stderr,"RF dopo recv s = %d\n ",s->s);//dbg
|
|
||||||
if ( ret <= 0 ) {
|
|
||||||
//fprintf(stderr,"RF ret %d\n ",ret );//dbg
|
|
||||||
perror("PB recvfrom_in");
|
|
||||||
RRM_FREE(buf);
|
|
||||||
return NULL ;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
head = (msg_head_t *) buf ;
|
|
||||||
size_msg = sizeof(msg_head_t) + head->size ;
|
|
||||||
|
|
||||||
msg = RRM_CALLOC(char , size_msg ) ;
|
|
||||||
|
|
||||||
if ( msg != NULL )
|
|
||||||
memcpy( msg , buf , size_msg ) ;
|
|
||||||
|
|
||||||
RRM_FREE( buf ) ;
|
|
||||||
//fprintf(stderr,"dim_msg %d\n ",sizeof(msg) );//dbg
|
|
||||||
//fprintf(stderr,"RF s at the end: %d\n ", s->s);//dbg
|
|
||||||
return msg ;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief This function send a buffer message to the internet socket
|
|
||||||
\return if OK then "0" is returned else "-1"
|
|
||||||
*/
|
|
||||||
int send_msg_int(
|
|
||||||
sock_rrm_int_t *s ,///< socket descriptor
|
|
||||||
msg_t *msg ///< the message to send
|
|
||||||
|
|
||||||
)
|
|
||||||
{
|
|
||||||
/* Internet socket */
|
|
||||||
int ret = 0 ;
|
|
||||||
char *buf = NULL;
|
|
||||||
int taille = sizeof(msg_head_t) ;
|
|
||||||
//fprintf(stderr,"Send IP msg socket -> %d\n ",s->s );//dbg
|
|
||||||
|
|
||||||
if ( msg == NULL )
|
|
||||||
return -1 ;
|
|
||||||
|
|
||||||
if ( msg->data != NULL )
|
|
||||||
taille += msg->head.size ;
|
|
||||||
|
|
||||||
buf = RRM_MALLOC(char, taille);
|
|
||||||
|
|
||||||
if (buf ==NULL)
|
|
||||||
ret = -1 ;
|
|
||||||
|
|
||||||
else {
|
|
||||||
memcpy( buf , &(msg->head) , sizeof(msg_head_t) ) ;
|
|
||||||
memcpy( buf+sizeof(msg_head_t), msg->data, msg->head.size ) ;
|
|
||||||
|
|
||||||
//fprintf(stderr,"Sendto IP msg on socket %d msg_type %d\n ",s->s, msg->head.msg_type );//dbg
|
|
||||||
//fprintf(stderr,"to %X \n\n\n\n\n", s->in_dest_addr.sin_addr.s_addr);//dbg
|
|
||||||
if ( sendto(s->s, buf, taille, 0, (struct sockaddr *)&(s->in_dest_addr), sizeof(struct sockaddr_in)) < 0 ) {
|
|
||||||
ret = -1;
|
|
||||||
perror("sendmsg:socket ip");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//fprintf(stderr,"Before free ret %d\n ", ret);//dbg
|
|
||||||
RRM_FREE(buf) ;
|
|
||||||
RRM_FREE(msg->data) ;
|
|
||||||
RRM_FREE(msg) ;
|
|
||||||
//fprintf(stderr,"After free ret %d\n ", ret);//dbg
|
|
||||||
return ret ;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief This function closes a RRM socket
|
|
||||||
\return none
|
|
||||||
*/
|
|
||||||
void close_socket_int(
|
|
||||||
sock_rrm_int_t *sock ///< the socket handle
|
|
||||||
)
|
|
||||||
{
|
|
||||||
shutdown(sock->s, SHUT_RDWR);
|
|
||||||
close(sock->s);
|
|
||||||
}
|
|
||||||
|
|
||||||
//mod_lor_10_01_25--
|
|
||||||
@@ -1,184 +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 rrm_sock.h
|
|
||||||
|
|
||||||
\brief Fichier d'entete contenant les declarations des types, des defines ,
|
|
||||||
et des fonctions relatives aux fonctions de communication RRM
|
|
||||||
(Radio Resource Management ) avec les autres entites RRC/CMM/PUSU.
|
|
||||||
|
|
||||||
\author BURLOT Pascal
|
|
||||||
|
|
||||||
\date 15/07/08
|
|
||||||
|
|
||||||
|
|
||||||
\par Historique:
|
|
||||||
$Author$ $Date$ $Revision$
|
|
||||||
$Id$
|
|
||||||
$Log$
|
|
||||||
|
|
||||||
*******************************************************************************
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef RRM_SOCK_H
|
|
||||||
#define RRM_SOCK_H
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#include <sys/socket.h>
|
|
||||||
#include <sys/un.h>
|
|
||||||
#include <netinet/in.h> //mod_lor_10_01_25
|
|
||||||
#include <netdb.h> //mod_lor_10_01_25
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
//AAA: if rrc_emul add a 0 at the end of file name
|
|
||||||
#ifdef RRC_EMUL
|
|
||||||
//! \brief Socket path associated to RRM-CMM interface
|
|
||||||
#define RRM_CMM_SOCK_PATH "/tmp/rrm_cmm_socket0"
|
|
||||||
//! \brief Socket path associated to CMM-RRM interface
|
|
||||||
#define CMM_RRM_SOCK_PATH "/tmp/cmm_rrm_socket0"
|
|
||||||
|
|
||||||
//! \brief Socket path associated to RRM-RRC interface
|
|
||||||
#define RRM_RRC_SOCK_PATH "/tmp/rrm_rrc_socket0"
|
|
||||||
//! \brief Socket path associated to RRC-RRM interface
|
|
||||||
#define RRC_RRM_SOCK_PATH "/tmp/rrc_rrm_socket0"
|
|
||||||
|
|
||||||
//! \brief Socket path associated to RRM-PUSU interface
|
|
||||||
#define RRM_PUSU_SOCK_PATH "/tmp/rrm_pusu_socket0"
|
|
||||||
//! \brief Socket path associated to PUSU-RRM interface
|
|
||||||
#define PUSU_RRM_SOCK_PATH "/tmp/pusu_rrm_socket0"
|
|
||||||
|
|
||||||
//! \brief Socket path associated to RRM-SENSING interface
|
|
||||||
#define RRM_SENSING_SOCK_PATH "/tmp/rrm_sensing_socket0"
|
|
||||||
//! \brief Socket path associated to SENSING-RRM interface
|
|
||||||
#define SENSING_RRM_SOCK_PATH "/tmp/sensing_rrm_socket0"
|
|
||||||
|
|
||||||
#else
|
|
||||||
//! \brief Socket path associated to RRM-CMM interface
|
|
||||||
#define RRM_CMM_SOCK_PATH "/tmp/rrm_cmm_socket"
|
|
||||||
//! \brief Socket path associated to CMM-RRM interface
|
|
||||||
#define CMM_RRM_SOCK_PATH "/tmp/cmm_rrm_socket"
|
|
||||||
|
|
||||||
//! \brief Socket path associated to RRM-RRC interface
|
|
||||||
#define RRM_RRC_SOCK_PATH "/tmp/rrm_rrc_socket"
|
|
||||||
//! \brief Socket path associated to RRC-RRM interface
|
|
||||||
#define RRC_RRM_SOCK_PATH "/tmp/rrc_rrm_socket"
|
|
||||||
|
|
||||||
//! \brief Socket path associated to RRM-PUSU interface
|
|
||||||
#define RRM_PUSU_SOCK_PATH "/tmp/rrm_pusu_socket"
|
|
||||||
//! \brief Socket path associated to PUSU-RRM interface
|
|
||||||
#define PUSU_RRM_SOCK_PATH "/tmp/pusu_rrm_socket"
|
|
||||||
|
|
||||||
//! \brief Socket path associated to RRM-SENSING interface
|
|
||||||
#define RRM_SENSING_SOCK_PATH "/tmp/rrm_sensing_socket"
|
|
||||||
//! \brief Socket path associated to SENSING-RRM interface
|
|
||||||
#define SENSING_RRM_SOCK_PATH "/tmp/sensing_rrm_socket"
|
|
||||||
#endif /*RRC_EMUL*/
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//! \brief Identification of the RRM/CMM/RRC message begin
|
|
||||||
#define START_MSG 0xA533
|
|
||||||
//! \brief Identification of the PUSU message begin
|
|
||||||
#define START_MSG_PUSU 0xCC
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief Entete des messages de RRM/CMM/RRC
|
|
||||||
*/
|
|
||||||
typedef struct {
|
|
||||||
unsigned short start ; ///< Identification du debut de message
|
|
||||||
Instance_t inst ; ///< Identification de l'instance RRM
|
|
||||||
unsigned char msg_type ; ///< Identification du type message
|
|
||||||
unsigned int size ; ///< Taille du message
|
|
||||||
Transaction_t Trans_id ; ///< Identification de la transaction
|
|
||||||
} msg_head_t ;
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief Definition de la structure d'un message a envoyer sur un socket:
|
|
||||||
- RRM->RRC
|
|
||||||
- RRC->RRM
|
|
||||||
- RRCI->RRC
|
|
||||||
- RRC->RRCI
|
|
||||||
- CMM->RRM
|
|
||||||
- RRM->CMM
|
|
||||||
*/
|
|
||||||
typedef struct {
|
|
||||||
msg_head_t head ; ///< entete du message
|
|
||||||
char *data ; ///< message
|
|
||||||
} msg_t ;
|
|
||||||
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief Definition de la structure definissant le socket pour envoyer les messages
|
|
||||||
*/
|
|
||||||
typedef struct {
|
|
||||||
int s ; ///< identification du socket
|
|
||||||
struct sockaddr_un un_local_addr ; ///< Adresse local si unix socket
|
|
||||||
struct sockaddr_un un_dest_addr ; ///< Adresse destinataire si unix socket
|
|
||||||
} sock_rrm_t ;
|
|
||||||
|
|
||||||
//mod_lor_10_01_25++
|
|
||||||
typedef struct {
|
|
||||||
int s ; ///< identification du socket
|
|
||||||
struct sockaddr_in in_local_addr ; ///< Adresse local si internet socket
|
|
||||||
struct sockaddr_in in_dest_addr ; ///< Adresse destinataire si internet socket
|
|
||||||
} sock_rrm_int_t ;
|
|
||||||
//mod_lor_10_01_25--
|
|
||||||
|
|
||||||
|
|
||||||
int open_socket( sock_rrm_t *s ,char *path_local, char *path_dest , int rrm_inst ) ;
|
|
||||||
void close_socket(sock_rrm_t *sock ) ;
|
|
||||||
int send_msg(sock_rrm_t *s ,msg_t *msg ) ;
|
|
||||||
char *recv_msg( sock_rrm_t *s ) ;
|
|
||||||
|
|
||||||
int open_socket_int( sock_rrm_int_t *s , unsigned char *path_local, int local_port, unsigned char *path_dest , int dest_port, int rrm_inst ) ; //mod_lor_10_01_25
|
|
||||||
int send_msg_int(sock_rrm_int_t *s ,msg_t *msg ) ; //mod_lor_10_01_25
|
|
||||||
char *recv_msg_int( sock_rrm_int_t *s ) ; //mod_lor_10_01_25
|
|
||||||
void close_socket_int(sock_rrm_int_t *sock ) ; //mod_lor_10_01_25
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
#endif /* RRM_SOCK_H */
|
|
||||||
@@ -1,16 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
killall emul_int
|
|
||||||
killall graph
|
|
||||||
killall rrm
|
|
||||||
|
|
||||||
xterm -T COMMAND_CONSOLE -bg '#000000' -fg '#00ff00' -hold -e ./emul_int &
|
|
||||||
|
|
||||||
sleep 2
|
|
||||||
|
|
||||||
#xterm -T RRM1 -hold -e
|
|
||||||
./rrm -i 6 #2> log.txt
|
|
||||||
|
|
||||||
#sleep 1
|
|
||||||
#./emul_int &
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1,179 +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 rrm_util.c
|
|
||||||
|
|
||||||
\brief Quelques fonctions utiles
|
|
||||||
|
|
||||||
\author BURLOT Pascal
|
|
||||||
|
|
||||||
\date 17/07/08
|
|
||||||
|
|
||||||
|
|
||||||
\par Historique:
|
|
||||||
$Author$ $Date$ $Revision$
|
|
||||||
$Id$
|
|
||||||
$Log$
|
|
||||||
|
|
||||||
*******************************************************************************
|
|
||||||
*/
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <errno.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <unistd.h>
|
|
||||||
#include <ctype.h>
|
|
||||||
#include <sys/time.h>
|
|
||||||
|
|
||||||
//#include "extern_definition.h"
|
|
||||||
#include "L3_rrc_defs.h"
|
|
||||||
#include "rrm_util.h"
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief Affichage de l'adresse MAC
|
|
||||||
*/
|
|
||||||
|
|
||||||
void print_L2_id(
|
|
||||||
L2_ID *id ///< Pointeur sur l'adresse MAC
|
|
||||||
)
|
|
||||||
{
|
|
||||||
int i ;
|
|
||||||
|
|
||||||
for ( i=0; i<8; i++)
|
|
||||||
fprintf(stderr,"%02X:", id->L2_id[i]);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief Affichage de l'adresse IP
|
|
||||||
*/
|
|
||||||
|
|
||||||
void print_L3_id(
|
|
||||||
L3_INFO_T type , ///< type de l'info de niveau 3
|
|
||||||
unsigned char *L3_info ///< Pointeur sur l'identification de niveau 3
|
|
||||||
)
|
|
||||||
{
|
|
||||||
int i , n =0 ;
|
|
||||||
|
|
||||||
if ( type==IPv4_ADDR)
|
|
||||||
n=4;
|
|
||||||
|
|
||||||
if (type==IPv6_ADDR)
|
|
||||||
n=16;
|
|
||||||
|
|
||||||
for ( i=0; i<n; i++)
|
|
||||||
fprintf(stderr,"%02X:", L3_info[i]);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief Affichage d'un message en hexa
|
|
||||||
*/
|
|
||||||
|
|
||||||
void printHex(
|
|
||||||
char *msg, ///< Message brute
|
|
||||||
int len , ///< Longueur a afficher
|
|
||||||
int opt ///< Option ASCII
|
|
||||||
)
|
|
||||||
{
|
|
||||||
int i ;
|
|
||||||
|
|
||||||
if (msg != NULL )
|
|
||||||
for ( i=0; i<len; i++) {
|
|
||||||
fprintf(stderr,"%02X", *msg&0xff);
|
|
||||||
|
|
||||||
if (opt ) {
|
|
||||||
char c = *msg ;
|
|
||||||
|
|
||||||
if ( c<' ' ) c=' ' ;
|
|
||||||
|
|
||||||
if ( c>'Z') c=' ' ;
|
|
||||||
|
|
||||||
fprintf(stderr,"(%c)", c );
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( i%16 == 15 )
|
|
||||||
fprintf(stderr,":\n");
|
|
||||||
else
|
|
||||||
fprintf(stderr,":");
|
|
||||||
|
|
||||||
msg++ ;
|
|
||||||
}
|
|
||||||
|
|
||||||
fprintf(stderr,"\n");
|
|
||||||
fflush( stderr) ;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief Lecture du registe de cycle du processeur
|
|
||||||
|
|
||||||
\return retourne le cycle courant du processeur
|
|
||||||
*/
|
|
||||||
|
|
||||||
__inline__ unsigned long long int rdtsc()
|
|
||||||
{
|
|
||||||
unsigned long long int x;
|
|
||||||
__asm__ volatile (".byte 0x0f, 0x31" : "=A" (x));
|
|
||||||
return x;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief La fonction retourne l'horloge courante
|
|
||||||
|
|
||||||
\return current clock
|
|
||||||
*/
|
|
||||||
double get_currentclock( )
|
|
||||||
{
|
|
||||||
/*
|
|
||||||
struct timespec tp;
|
|
||||||
clock_gettime(CLOCK_REALTIME, &tp );
|
|
||||||
return ( ((double) tp.tv_sec ) + ( (double) tp.tv_nsec)*1.0E-9 ) ;
|
|
||||||
*/
|
|
||||||
#ifdef LINUX
|
|
||||||
|
|
||||||
struct timeval tv;
|
|
||||||
struct timezone tz;
|
|
||||||
|
|
||||||
gettimeofday(&tv, &tz);
|
|
||||||
|
|
||||||
return ( ((double) tv.tv_sec ) + ( (double) tv.tv_usec)*1e-6) ;
|
|
||||||
#else
|
|
||||||
unsigned long long int x;
|
|
||||||
__asm__ volatile (".byte 0x0f, 0x31" : "=A" (x));
|
|
||||||
|
|
||||||
return ( (double) x * 0.36e-9 ) ;
|
|
||||||
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
@@ -1,109 +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 rrm_util.h
|
|
||||||
|
|
||||||
\brief Fichier d'entete contenant les declarations des types, des defines ,
|
|
||||||
et des fonctions relatives a des routines utilitaires du RRM .
|
|
||||||
|
|
||||||
\author BURLOT Pascal
|
|
||||||
|
|
||||||
\date 17/07/08
|
|
||||||
|
|
||||||
|
|
||||||
\par Historique:
|
|
||||||
P.BURLOT 2009-01-20
|
|
||||||
+ ajout de la macro msg_fifo() pour debug
|
|
||||||
+ ajout de la macro MSG_L2ID() pour l'affichage du L2_ID (debug)
|
|
||||||
+ ajout de la macro RRM_CALLOC2() (utilise par la fonction msg_rrc_sensing_meas_ind())
|
|
||||||
+ ajout d'un #ifdef USE_CALLOC si on veut utiliser calloc() ou malloc().
|
|
||||||
|
|
||||||
*******************************************************************************
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef RRM_UTIL_H
|
|
||||||
#define RRM_UTIL_H
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if 1
|
|
||||||
//! Macro permettant l'affichage pour le debug
|
|
||||||
#define msg( ... ) printf(__VA_ARGS__)
|
|
||||||
//! Macro permettant l'affichage pour le debug
|
|
||||||
#define msg_fct( ... ) printf(__VA_ARGS__)
|
|
||||||
#else
|
|
||||||
//! Macro inactive
|
|
||||||
#define msg( ... )
|
|
||||||
//! Macro inactive
|
|
||||||
#define msg_fct( ... )
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if 0
|
|
||||||
//! Macro permettant l'affichage pour le debug
|
|
||||||
#define msg_fifo( ... ) printf(__VA_ARGS__)
|
|
||||||
#else
|
|
||||||
//! Macro inactive
|
|
||||||
#define msg_fifo( ... )
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define MSG_L2ID(p) msg("[INFO] L2ID=%02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x:\n",\
|
|
||||||
(p).L2_id[0],(p).L2_id[1], (p).L2_id[2],(p).L2_id[3],\
|
|
||||||
(p).L2_id[4],(p).L2_id[5], (p).L2_id[6],(p).L2_id[7] );
|
|
||||||
|
|
||||||
#define RRM_FREE(p) if ( (p) != NULL) { free(p) ; p=NULL ; } if ( (p) != NULL) { fprintf( stderr, "(%d) [%s]\n",__LINE__, __FILE__); fflush(stderr) ; }
|
|
||||||
#define RRM_MALLOC(t,n) (t *) malloc( sizeof(t) * n )
|
|
||||||
|
|
||||||
#ifdef USE_CALLOC
|
|
||||||
// calloc version : la memoire est intialisee a zero
|
|
||||||
#define RRM_CALLOC(t,n) (t *) calloc( n , sizeof(t))
|
|
||||||
#define RRM_CALLOC2(t,s) (t *) calloc( 1 , s )
|
|
||||||
#else
|
|
||||||
// malloc version : la memoire n'est pas intialisee a zero
|
|
||||||
#define RRM_CALLOC(t,n) (t *) malloc( sizeof(t) * n )
|
|
||||||
#define RRM_CALLOC2(t,s) (t *) malloc( s )
|
|
||||||
#endif /* USE_CALLOC */
|
|
||||||
|
|
||||||
#define RRM_MALLOC_STR(n) RRM_MALLOC(char,n+1)
|
|
||||||
|
|
||||||
void print_L2_id( L2_ID *id );
|
|
||||||
void print_L3_id(L3_INFO_T type,unsigned char *L3_info);
|
|
||||||
void printHex( char *msg, int len , int opt);
|
|
||||||
double get_currentclock( ) ;
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif /* RRM_UTIL_H */
|
|
||||||
@@ -1,83 +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
|
|
||||||
|
|
||||||
*******************************************************************************/
|
|
||||||
|
|
||||||
/* Form definition file generated with fdesign. */
|
|
||||||
|
|
||||||
#include "forms.h"
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include "sens_CH1_scen_2.h"
|
|
||||||
|
|
||||||
FD_sens_CH1_scen_2 *create_form_sens_CH1_scen_2(void)
|
|
||||||
{
|
|
||||||
FL_OBJECT *obj;
|
|
||||||
FD_sens_CH1_scen_2 *fdui = (FD_sens_CH1_scen_2 *) fl_calloc(1, sizeof(*fdui));
|
|
||||||
|
|
||||||
//mod_lor_10_12_07++
|
|
||||||
fdui->sens_CH1_scen_2 = fl_bgn_form(FL_NO_BOX, 460, 560);
|
|
||||||
obj = fl_add_box(FL_UP_BOX,0,0,460,560,"");
|
|
||||||
fdui->User_1_sens = obj = fl_add_xyplot(FL_IMPULSE_XYPLOT,20,10,420,100,"User_1_sens");
|
|
||||||
fl_set_object_color(obj,FL_BLACK,FL_BLUE);
|
|
||||||
fl_set_object_lsize(obj,FL_NORMAL_SIZE);
|
|
||||||
fdui->User_2_sens = obj = fl_add_xyplot(FL_IMPULSE_XYPLOT,20,140,420,100,"User_2_sens");
|
|
||||||
fl_set_object_color(obj,FL_BLACK,FL_BLUE);
|
|
||||||
fl_set_object_lsize(obj,FL_NORMAL_SIZE);
|
|
||||||
fdui->User_3_sens = obj = fl_add_xyplot(FL_IMPULSE_XYPLOT,20,280,420,100,"User_3_sens");
|
|
||||||
fl_set_object_color(obj,FL_BLACK,FL_BLUE);
|
|
||||||
fl_set_object_lsize(obj,FL_NORMAL_SIZE);
|
|
||||||
fdui->Cluster_2_sensing = obj = fl_add_xyplot(FL_IMPULSE_XYPLOT,20,420,420,100,"Cluster_2_received_information");
|
|
||||||
fl_set_object_color(obj,FL_BLACK,FL_YELLOW);
|
|
||||||
fl_set_object_lsize(obj,FL_NORMAL_SIZE);
|
|
||||||
//mod_lor_10_12_07--: messo in nota
|
|
||||||
|
|
||||||
/* fdui->sens_CH1_scen_2 = fl_bgn_form(FL_NO_BOX, 650, 740);
|
|
||||||
obj = fl_add_box(FL_UP_BOX,0,0,650,740,"");
|
|
||||||
fdui->User_1_sens = obj = fl_add_xyplot(FL_IMPULSE_XYPLOT,40,10,560,110,"User_1_sens");
|
|
||||||
fl_set_object_color(obj,FL_BLACK,FL_BLUE);
|
|
||||||
fl_set_object_lsize(obj,FL_NORMAL_SIZE);
|
|
||||||
fdui->User_2_sens = obj = fl_add_xyplot(FL_IMPULSE_XYPLOT,40,150,560,110,"User_2_sens");
|
|
||||||
fl_set_object_color(obj,FL_BLACK,FL_BLUE);
|
|
||||||
fl_set_object_lsize(obj,FL_NORMAL_SIZE);
|
|
||||||
fdui->User_3_sens = obj = fl_add_xyplot(FL_IMPULSE_XYPLOT,40,290,560,110,"User_3_sens");
|
|
||||||
fl_set_object_color(obj,FL_BLACK,FL_BLUE);
|
|
||||||
fl_set_object_lsize(obj,FL_NORMAL_SIZE);
|
|
||||||
fdui->User_4_sens = obj = fl_add_xyplot(FL_IMPULSE_XYPLOT,40,430,560,110,"User_4_sens");
|
|
||||||
fl_set_object_color(obj,FL_BLACK,FL_BLUE);
|
|
||||||
fl_set_object_lsize(obj,FL_NORMAL_SIZE);
|
|
||||||
fdui->Cluster_2_sensing = obj = fl_add_xyplot(FL_IMPULSE_XYPLOT,40,570,560,130,"Cluster_2_global_sensing");
|
|
||||||
fl_set_object_color(obj,FL_BLACK,FL_YELLOW);
|
|
||||||
fl_set_object_lsize(obj,FL_NORMAL_SIZE);
|
|
||||||
*/
|
|
||||||
fl_end_form();
|
|
||||||
|
|
||||||
fdui->sens_CH1_scen_2->fdui = fdui;
|
|
||||||
|
|
||||||
return fdui;
|
|
||||||
}
|
|
||||||
/*---------------------------------------*/
|
|
||||||
|
|
||||||
@@ -1,124 +0,0 @@
|
|||||||
Magic: 13000
|
|
||||||
|
|
||||||
Internal Form Definition File
|
|
||||||
(do not change)
|
|
||||||
|
|
||||||
Number of forms: 1
|
|
||||||
Unit of measure: FL_COORD_PIXEL
|
|
||||||
|
|
||||||
=============== FORM ===============
|
|
||||||
Name: sens_CH1_scen_2
|
|
||||||
Width: 650
|
|
||||||
Height: 740
|
|
||||||
Number of Objects: 6
|
|
||||||
|
|
||||||
--------------------
|
|
||||||
class: FL_BOX
|
|
||||||
type: UP_BOX
|
|
||||||
box: 0 0 650 740
|
|
||||||
boxtype: FL_UP_BOX
|
|
||||||
colors: FL_COL1 FL_COL1
|
|
||||||
alignment: FL_ALIGN_CENTER
|
|
||||||
style: FL_NORMAL_STYLE
|
|
||||||
size: FL_DEFAULT_SIZE
|
|
||||||
lcol: FL_BLACK
|
|
||||||
label:
|
|
||||||
shortcut:
|
|
||||||
resize: FL_RESIZE_ALL
|
|
||||||
gravity: FL_NoGravity FL_NoGravity
|
|
||||||
name:
|
|
||||||
callback:
|
|
||||||
argument:
|
|
||||||
|
|
||||||
--------------------
|
|
||||||
class: FL_XYPLOT
|
|
||||||
type: IMPULSE_XYPLOT
|
|
||||||
box: 40 10 560 110
|
|
||||||
boxtype: FL_FLAT_BOX
|
|
||||||
colors: FL_BLACK FL_BLUE
|
|
||||||
alignment: FL_ALIGN_BOTTOM
|
|
||||||
style: FL_NORMAL_STYLE
|
|
||||||
size: FL_NORMAL_SIZE
|
|
||||||
lcol: FL_BLACK
|
|
||||||
label: User_1_sens
|
|
||||||
shortcut:
|
|
||||||
resize: FL_RESIZE_ALL
|
|
||||||
gravity: FL_NoGravity FL_NoGravity
|
|
||||||
name: User_1_sens
|
|
||||||
callback:
|
|
||||||
argument:
|
|
||||||
|
|
||||||
--------------------
|
|
||||||
class: FL_XYPLOT
|
|
||||||
type: IMPULSE_XYPLOT
|
|
||||||
box: 40 150 560 110
|
|
||||||
boxtype: FL_FLAT_BOX
|
|
||||||
colors: FL_BLACK FL_BLUE
|
|
||||||
alignment: FL_ALIGN_BOTTOM
|
|
||||||
style: FL_NORMAL_STYLE
|
|
||||||
size: FL_NORMAL_SIZE
|
|
||||||
lcol: FL_BLACK
|
|
||||||
label: User_2_sens
|
|
||||||
shortcut:
|
|
||||||
resize: FL_RESIZE_ALL
|
|
||||||
gravity: FL_NoGravity FL_NoGravity
|
|
||||||
name: User_2_sens
|
|
||||||
callback:
|
|
||||||
argument:
|
|
||||||
|
|
||||||
--------------------
|
|
||||||
class: FL_XYPLOT
|
|
||||||
type: IMPULSE_XYPLOT
|
|
||||||
box: 40 290 560 110
|
|
||||||
boxtype: FL_FLAT_BOX
|
|
||||||
colors: FL_BLACK FL_BLUE
|
|
||||||
alignment: FL_ALIGN_BOTTOM
|
|
||||||
style: FL_NORMAL_STYLE
|
|
||||||
size: FL_NORMAL_SIZE
|
|
||||||
lcol: FL_BLACK
|
|
||||||
label: User_3_sens
|
|
||||||
shortcut:
|
|
||||||
resize: FL_RESIZE_ALL
|
|
||||||
gravity: FL_NoGravity FL_NoGravity
|
|
||||||
name: User_3_sens
|
|
||||||
callback:
|
|
||||||
argument:
|
|
||||||
|
|
||||||
--------------------
|
|
||||||
class: FL_XYPLOT
|
|
||||||
type: IMPULSE_XYPLOT
|
|
||||||
box: 40 430 560 110
|
|
||||||
boxtype: FL_FLAT_BOX
|
|
||||||
colors: FL_BLACK FL_BLUE
|
|
||||||
alignment: FL_ALIGN_BOTTOM
|
|
||||||
style: FL_NORMAL_STYLE
|
|
||||||
size: FL_NORMAL_SIZE
|
|
||||||
lcol: FL_BLACK
|
|
||||||
label: User_4_sens
|
|
||||||
shortcut:
|
|
||||||
resize: FL_RESIZE_ALL
|
|
||||||
gravity: FL_NoGravity FL_NoGravity
|
|
||||||
name: User_4_sens
|
|
||||||
callback:
|
|
||||||
argument:
|
|
||||||
|
|
||||||
--------------------
|
|
||||||
class: FL_XYPLOT
|
|
||||||
type: IMPULSE_XYPLOT
|
|
||||||
box: 40 570 560 130
|
|
||||||
boxtype: FL_FLAT_BOX
|
|
||||||
colors: FL_BLACK FL_YELLOW
|
|
||||||
alignment: FL_ALIGN_BOTTOM
|
|
||||||
style: FL_NORMAL_STYLE
|
|
||||||
size: FL_NORMAL_SIZE
|
|
||||||
lcol: FL_BLACK
|
|
||||||
label: Cluster_2_sensing
|
|
||||||
shortcut:
|
|
||||||
resize: FL_RESIZE_ALL
|
|
||||||
gravity: FL_NoGravity FL_NoGravity
|
|
||||||
name: Cluster_2_sensing
|
|
||||||
callback:
|
|
||||||
argument:
|
|
||||||
|
|
||||||
==============================
|
|
||||||
create_the_forms
|
|
||||||
@@ -1,53 +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
|
|
||||||
|
|
||||||
*******************************************************************************/
|
|
||||||
|
|
||||||
/** Header file generated with fdesign on Fri Nov 5 17:11:31 2010.**/
|
|
||||||
|
|
||||||
#ifndef FD_sens_CH1_scen_2_h_
|
|
||||||
#define FD_sens_CH1_scen_2_h_
|
|
||||||
|
|
||||||
/** Callbacks, globals and object handlers **/
|
|
||||||
|
|
||||||
|
|
||||||
/**** Forms and Objects ****/
|
|
||||||
typedef struct {
|
|
||||||
FL_FORM *sens_CH1_scen_2;
|
|
||||||
void *vdata;
|
|
||||||
char *cdata;
|
|
||||||
long ldata;
|
|
||||||
FL_OBJECT *User_1_sens;
|
|
||||||
FL_OBJECT *User_2_sens;
|
|
||||||
FL_OBJECT *User_3_sens;
|
|
||||||
FL_OBJECT *User_4_sens;
|
|
||||||
FL_OBJECT *Cluster_2_sensing;
|
|
||||||
} FD_sens_CH1_scen_2;
|
|
||||||
|
|
||||||
extern FD_sens_CH1_scen_2 * create_form_sens_CH1_scen_2(void);
|
|
||||||
|
|
||||||
#endif /* FD_sens_CH1_scen_2_h_ */
|
|
||||||
@@ -1,569 +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 sens_db.c
|
|
||||||
|
|
||||||
\brief Fonctions permettant la gestion de la base de donnée sur les infor-
|
|
||||||
mations du sensing
|
|
||||||
|
|
||||||
\author IACOBELLI Lorenzo
|
|
||||||
|
|
||||||
\date 16/10/09
|
|
||||||
|
|
||||||
|
|
||||||
\par Historique:
|
|
||||||
$Author$ $Date$ $Revision$
|
|
||||||
$Id$
|
|
||||||
$Log$
|
|
||||||
|
|
||||||
*******************************************************************************
|
|
||||||
*/
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <errno.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <unistd.h>
|
|
||||||
|
|
||||||
#include <sys/socket.h>
|
|
||||||
#include <sys/un.h>
|
|
||||||
|
|
||||||
#include <pthread.h>
|
|
||||||
|
|
||||||
#include "debug.h"
|
|
||||||
#include "L3_rrc_defs.h"
|
|
||||||
#include "rrm_util.h"
|
|
||||||
#include "sens_db.h"
|
|
||||||
#include "channels_db.h"
|
|
||||||
|
|
||||||
|
|
||||||
//! Selection locale du mode de debug
|
|
||||||
#define DBG_SENS_DB 0
|
|
||||||
|
|
||||||
#if DBG_SENS_DB==0
|
|
||||||
//! Macro inactive
|
|
||||||
#define PRINT_SENS_DB(...)
|
|
||||||
#else
|
|
||||||
//! Macro affichant la liste des radio bearers
|
|
||||||
#define PRINT_SENS_DB(...) print_sens_db( __VA_ARGS__ )
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief La fonction affiche a l'ecran la liste (pour du debug)
|
|
||||||
|
|
||||||
\return aucune valeur retournee
|
|
||||||
*/
|
|
||||||
void print_sens_db(
|
|
||||||
Sens_node_t *pEntry ///< pointeur sur le debut de liste
|
|
||||||
)
|
|
||||||
{
|
|
||||||
//unsigned int i; //dbg
|
|
||||||
Sens_node_t *pCurrentItem = pEntry;
|
|
||||||
Sens_ch_t *pCurrentChannel;
|
|
||||||
int i,k;
|
|
||||||
|
|
||||||
fprintf(stderr,"node entry @%p \n", pEntry);//dbg
|
|
||||||
|
|
||||||
//fprintf(stderr,"sens list=[\n");
|
|
||||||
while ( pCurrentItem != NULL) {
|
|
||||||
//fprintf(stderr,"curr item @%p \n", pCurrentItem);//dbg
|
|
||||||
//fprintf(stderr," @%p(.info_time=%f, ",
|
|
||||||
// pCurrentItem, pCurrentItem->info_time);
|
|
||||||
|
|
||||||
//fprintf(stderr,", @SRC= \n");
|
|
||||||
fprintf(stderr,"\nnode : ");
|
|
||||||
|
|
||||||
for ( i=0; i<8; i++)
|
|
||||||
fprintf(stderr,"%02X", pCurrentItem->L2_id.L2_id[i]);
|
|
||||||
|
|
||||||
// fprintf(stderr,"\ntpc :%d ",pCurrentItem->tpc);
|
|
||||||
// fprintf(stderr,"overlap :%d ",pCurrentItem->overlap);
|
|
||||||
// fprintf(stderr,"sampl_freq :%d \n",pCurrentItem->sampl_freq);
|
|
||||||
pCurrentChannel=pCurrentItem->info_hd;
|
|
||||||
|
|
||||||
while ( pCurrentChannel != NULL) {
|
|
||||||
fprintf(stderr,"\n @%p(\n.channel_id=%d, \n.start_fr=%d , \n.end_fr= %d:\n ",
|
|
||||||
pCurrentChannel, pCurrentChannel->Ch_id, pCurrentChannel->Start_f,pCurrentChannel->Final_f); //mod_lor_10_03_17: intxflot
|
|
||||||
|
|
||||||
for (k=0; k<NUM_SB; k++)
|
|
||||||
//printf("%d %d; ",k,pCurrentChannel->is_free[k]);
|
|
||||||
printf ("k= %d, mu0=%d; mu1=%d; I0 = %d; is_free = %d\n",k,pCurrentChannel->mu0[k],pCurrentChannel->mu1[k],pCurrentChannel->I0[k], pCurrentChannel->is_free[k]);
|
|
||||||
|
|
||||||
printf("\n\n");
|
|
||||||
pCurrentChannel = pCurrentChannel->next ;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
fprintf(stderr,",\n .Lchan_desc=%p(",&(pCurrentItem->Lchan_desc));
|
|
||||||
fprintf(stderr,".transport_block_size=%d,",pCurrentItem->Lchan_desc.transport_block_size);
|
|
||||||
fprintf(stderr,".max_transport_blocks=%d,",pCurrentItem->Lchan_desc.max_transport_blocks);
|
|
||||||
fprintf(stderr,".Guaranteed_bit_rate=%ld,",pCurrentItem->Lchan_desc.Guaranteed_bit_rate);
|
|
||||||
fprintf(stderr,".Max_bit_rate=%ld,",pCurrentItem->Lchan_desc.Max_bit_rate);
|
|
||||||
fprintf(stderr,".Delay_class=%d,",pCurrentItem->Lchan_desc.Delay_class);
|
|
||||||
fprintf(stderr,".Target_bler=%d,",pCurrentItem->Lchan_desc.Target_bler);
|
|
||||||
fprintf(stderr,".LCHAN_t=%d),",pCurrentItem->Lchan_desc.LCHAN_t);
|
|
||||||
|
|
||||||
fprintf(stderr,",\n .Mac_rlc_meas_desc=%p(",&(pCurrentItem->Mac_rlc_meas_desc));
|
|
||||||
fprintf(stderr,".Meas_trigger=%p(",&(pCurrentItem->Mac_rlc_meas_desc.Meas_trigger));
|
|
||||||
fprintf(stderr,".Rssi=%d, ",pCurrentItem->Mac_rlc_meas_desc.Meas_trigger.Rssi);
|
|
||||||
fprintf(stderr,".Sinr=%d, ",pCurrentItem->Mac_rlc_meas_desc.Meas_trigger.Sinr);
|
|
||||||
fprintf(stderr,".Harq_delay=%u, ",pCurrentItem->Mac_rlc_meas_desc.Meas_trigger.Harq_delay);
|
|
||||||
fprintf(stderr,".Bler=%u,",pCurrentItem->Mac_rlc_meas_desc.Meas_trigger.Bler);
|
|
||||||
fprintf(stderr,".Spec_eff=%u), ",pCurrentItem->Mac_rlc_meas_desc.Meas_trigger.Spec_eff);
|
|
||||||
fprintf(stderr,".Mac_avg=%p(",&(pCurrentItem->Mac_rlc_meas_desc.Mac_avg));
|
|
||||||
fprintf(stderr,".Rssi_forgetting_factor=%u, ",pCurrentItem->Mac_rlc_meas_desc.Mac_avg.Rssi_forgetting_factor);
|
|
||||||
fprintf(stderr,".Sinr_forgetting_factor=%u, ",pCurrentItem->Mac_rlc_meas_desc.Mac_avg.Sinr_forgetting_factor);
|
|
||||||
fprintf(stderr,".Harq_delay_forgetting_factor=%u, ",pCurrentItem->Mac_rlc_meas_desc.Mac_avg.Harq_delay_forgetting_factor);
|
|
||||||
fprintf(stderr,".Bler_forgetting_factor=%u, ",pCurrentItem->Mac_rlc_meas_desc.Mac_avg.Bler_forgetting_factor);
|
|
||||||
fprintf(stderr,".Spec_eff_forgetting_factor=%u),\n",pCurrentItem->Mac_rlc_meas_desc.Mac_avg.Spec_eff_forgetting_factor);
|
|
||||||
fprintf(stderr," .bo_forgetting_factor=%u,",pCurrentItem->Mac_rlc_meas_desc.bo_forgetting_factor);
|
|
||||||
fprintf(stderr,".sdu_loss_trigger=%u,",pCurrentItem->Mac_rlc_meas_desc.sdu_loss_trigger);
|
|
||||||
fprintf(stderr,".Rep_amount=%u,",pCurrentItem->Mac_rlc_meas_desc.Rep_amount);
|
|
||||||
fprintf(stderr,".Rep_interval=%d,",pCurrentItem->Mac_rlc_meas_desc.Rep_interval);
|
|
||||||
*/
|
|
||||||
|
|
||||||
fprintf(stderr,"\n");
|
|
||||||
|
|
||||||
pCurrentItem = pCurrentItem->next ;
|
|
||||||
}
|
|
||||||
|
|
||||||
fprintf(stderr," ]\n");
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief Comparaison de deux ID de niveau 2
|
|
||||||
|
|
||||||
\return si 0 alors les IDs sont identiques
|
|
||||||
*/
|
|
||||||
static int L2_ID_cmp(
|
|
||||||
L2_ID *L2_id1, ///< ID de niveau 2
|
|
||||||
L2_ID *L2_id2 ///< ID de niveau 2
|
|
||||||
)
|
|
||||||
{
|
|
||||||
return memcmp( L2_id1, L2_id2, sizeof(L2_ID) ) ;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief La fonction ajoute un noeud dans la liste des noeuds.
|
|
||||||
|
|
||||||
\return retourne la valeur du nouvel element
|
|
||||||
*/
|
|
||||||
|
|
||||||
Sens_node_t *add_node(
|
|
||||||
Sens_node_t **node_entry , ///< pointeur sur l'entree de la liste de noeuds
|
|
||||||
L2_ID *L2_id , ///< node ID
|
|
||||||
unsigned int NB_info , ///< Number of channel info
|
|
||||||
Sens_ch_t *ch_info_hd , ///< information received from the node
|
|
||||||
double info_time
|
|
||||||
)
|
|
||||||
{
|
|
||||||
|
|
||||||
//fprintf(stderr,"\n NB_info=%d \n", NB_info); //dbg
|
|
||||||
Sens_node_t *pOldEntry = *node_entry;
|
|
||||||
Sens_node_t *pNewItem = RRM_CALLOC( Sens_node_t , 1 ) ;
|
|
||||||
|
|
||||||
PNULL(pNewItem) ;
|
|
||||||
|
|
||||||
if ( pNewItem == NULL )
|
|
||||||
return NULL ;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
memcpy( pNewItem->L2_id.L2_id , L2_id->L2_id, sizeof(L2_ID) ) ;
|
|
||||||
pNewItem->info_time = info_time ;
|
|
||||||
pNewItem->Nb_chan = NB_info;
|
|
||||||
pNewItem->info_hd = NULL;
|
|
||||||
|
|
||||||
//fprintf(stderr,"starting ch pointer @%p \n", pNewItem->info_hd);//dbg
|
|
||||||
for ( int i=0; i<NB_info; i++ ) {
|
|
||||||
if ( add_chann( &(pNewItem->info_hd), ch_info_hd[i].Start_f,
|
|
||||||
ch_info_hd[i].Final_f, ch_info_hd[i].Ch_id, ch_info_hd[i].I0,ch_info_hd[i].mu0,ch_info_hd[i].mu1,
|
|
||||||
/*ch_info_hd[i].meas,*/ ch_info_hd[i].is_free) == NULL )
|
|
||||||
fprintf(stderr, "ERROR: info %d problem\n", i) ;
|
|
||||||
|
|
||||||
//fprintf(stderr,"returned pointer @%p Channel id %d\n", pNewItem->info_hd, ch_info_hd[i].Ch_id);//dbg
|
|
||||||
}
|
|
||||||
|
|
||||||
*node_entry = pNewItem ;
|
|
||||||
pNewItem->next = pOldEntry;
|
|
||||||
/*fprintf(stderr,"add_node\n\n");//dbg
|
|
||||||
fprintf(stderr,"node entry @%p \n", (*node_entry)->info_hd);//dbg
|
|
||||||
fprintf(stderr,"node entry @%p \n", pNewItem->info_hd);//dbg
|
|
||||||
fprintf(stderr,"passed par @%p \n", *node_entry);//dbg*/
|
|
||||||
PRINT_SENS_DB( *node_entry );
|
|
||||||
return pNewItem ;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief La fonction ajoute un channel aux info relatives à un noeud.
|
|
||||||
|
|
||||||
\return retourne la valeur du nouvel element
|
|
||||||
*/
|
|
||||||
|
|
||||||
Sens_ch_t *add_chann(
|
|
||||||
Sens_ch_t **ch_entry , ///< pointeur sur l'entree de la liste de channels
|
|
||||||
unsigned int Start_f , ///< frequence initial du canal //mod_lor_10_03_17: intxflot
|
|
||||||
unsigned int Final_f , ///< frequence final du canal //mod_lor_10_03_17: intxflot
|
|
||||||
unsigned int Ch_id , ///< Channel ID //mod_lor_10_03_17: intxflot
|
|
||||||
//mod_eure_lor++
|
|
||||||
char *I0 ,
|
|
||||||
char *mu0,
|
|
||||||
char *mu1,
|
|
||||||
|
|
||||||
//float meas , ///< Sensing results
|
|
||||||
unsigned int *is_free ///< Evaluation about the availability of the channel //mod_lor_10_05_28 ->char instead of int
|
|
||||||
//mod_eure_lor--
|
|
||||||
)
|
|
||||||
{
|
|
||||||
Sens_ch_t *pOldEntry = *ch_entry;
|
|
||||||
Sens_ch_t *pNewItem = RRM_CALLOC( Sens_ch_t , 1 ) ;
|
|
||||||
int i;
|
|
||||||
|
|
||||||
/*fprintf(stderr,"\nadd_channel: %d\n", Ch_id);//dbg
|
|
||||||
fprintf(stderr,"old header @%p \n", pOldEntry);//dbg
|
|
||||||
fprintf(stderr,"new pointer @%p \n", pNewItem);//dbg*/
|
|
||||||
|
|
||||||
PNULL(pNewItem) ;
|
|
||||||
|
|
||||||
if ( pNewItem == NULL )
|
|
||||||
return NULL ;
|
|
||||||
|
|
||||||
pNewItem->Start_f = Start_f ;
|
|
||||||
pNewItem->Final_f = Final_f ;
|
|
||||||
pNewItem->Ch_id = Ch_id;
|
|
||||||
//printf("sens_db add 1: %d ", pNewItem->Ch_id);//dbg
|
|
||||||
//mod_eure_lor++
|
|
||||||
memcpy(pNewItem->I0 ,I0, MAX_NUM_SB);
|
|
||||||
memcpy(pNewItem->mu0,mu0, MAX_NUM_SB);
|
|
||||||
memcpy(pNewItem->mu1,mu1, MAX_NUM_SB);
|
|
||||||
memcpy(pNewItem->is_free, is_free,MAX_NUM_SB*sizeof(unsigned int));//mod_lor_10_05_28 ->char instead of int
|
|
||||||
//for (i=0; i<MAX_NUM_SB; i++)
|
|
||||||
// printf("up_chann: Channel %d sb %d is_free %d pitem is_free %d\n",Ch_id,i,is_free[i],pNewItem->is_free[i]);
|
|
||||||
|
|
||||||
//mod_eure_lor--
|
|
||||||
//pNewItem->meas = meas;
|
|
||||||
//pNewItem->is_free = is_free;
|
|
||||||
//printf("sens_db add 2: %d\n", pNewItem->Ch_id);//dbg
|
|
||||||
*ch_entry = pNewItem ;
|
|
||||||
pNewItem->next = pOldEntry;
|
|
||||||
//fprintf(stderr,"new pointer @%p \n", *ch_entry);//dbg
|
|
||||||
//fprintf(stderr,"new pointer @%p \n", *ch_entry->next);//dbg
|
|
||||||
//fprintf(stderr,"new pointer @%p \n", pNewItem->next);//dbg
|
|
||||||
|
|
||||||
|
|
||||||
return pNewItem ;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief La fonction detruit entierement les info sur les canaux memorizées à l'adresse indiqué
|
|
||||||
|
|
||||||
\return aucune valeur.
|
|
||||||
*/
|
|
||||||
void del_channels_info(
|
|
||||||
Sens_ch_t **ch_info_entry ///< pointeur sur l'entree des informations sur les canaux
|
|
||||||
)
|
|
||||||
{
|
|
||||||
Sens_ch_t *pCurrentItem = *ch_info_entry;
|
|
||||||
Sens_ch_t *pNextItem ;
|
|
||||||
|
|
||||||
if ( (pCurrentItem == NULL) || (ch_info_entry==NULL))
|
|
||||||
return ;
|
|
||||||
|
|
||||||
while ( pCurrentItem != NULL ) {
|
|
||||||
pNextItem = pCurrentItem->next ;
|
|
||||||
RRM_FREE( pCurrentItem ) ;
|
|
||||||
pCurrentItem = pNextItem ;
|
|
||||||
}
|
|
||||||
|
|
||||||
*ch_info_entry = NULL ;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief La fonction retire l'element identifie par le node_id de la liste des noeuds
|
|
||||||
|
|
||||||
\return aucune valeur.
|
|
||||||
*/
|
|
||||||
void del_node(
|
|
||||||
Sens_node_t **node_entry , ///< pointeur sur l'entree de la liste de noeuds
|
|
||||||
L2_ID *L2_id ///< node ID
|
|
||||||
)
|
|
||||||
{
|
|
||||||
Sens_node_t *pCurrentItem = *node_entry;
|
|
||||||
Sens_node_t *pNextItem ;
|
|
||||||
Sens_node_t **ppPrevItem = node_entry ;
|
|
||||||
|
|
||||||
if ( (pCurrentItem == NULL) || (node_entry==NULL))
|
|
||||||
return ;
|
|
||||||
|
|
||||||
while ( pCurrentItem != NULL ) {
|
|
||||||
pNextItem = pCurrentItem->next ;
|
|
||||||
|
|
||||||
if ( L2_ID_cmp( &(pCurrentItem->L2_id),L2_id) == 0 ) {
|
|
||||||
*ppPrevItem = pNextItem;
|
|
||||||
del_channels_info (&pCurrentItem->info_hd);
|
|
||||||
RRM_FREE( pCurrentItem ) ;
|
|
||||||
fprintf( stderr,"Noeud ");
|
|
||||||
|
|
||||||
for ( int i=0; i<8; i++)
|
|
||||||
msg_fct("%02X", L2_id->L2_id[i]);
|
|
||||||
|
|
||||||
msg_fct( " deleted from database\n");
|
|
||||||
|
|
||||||
return ;
|
|
||||||
}
|
|
||||||
|
|
||||||
ppPrevItem = &(pCurrentItem->next) ;
|
|
||||||
pCurrentItem = pNextItem ;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( pCurrentItem == NULL )
|
|
||||||
fprintf(stderr, "ERROR: node_id unknown\n") ;
|
|
||||||
|
|
||||||
//PRINT_SENS_DB( *node_entry );
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief La fonction detruit entierement la liste des noeuds
|
|
||||||
|
|
||||||
\return aucune valeur.
|
|
||||||
*/
|
|
||||||
void del_all_nodes(
|
|
||||||
Sens_node_t **node_entry ///< pointeur sur l'entree de la liste de noeuds
|
|
||||||
)
|
|
||||||
{
|
|
||||||
Sens_node_t *pCurrentItem = *node_entry;
|
|
||||||
Sens_node_t *pNextItem ;
|
|
||||||
|
|
||||||
if ( (pCurrentItem == NULL) || (node_entry==NULL))
|
|
||||||
return ;
|
|
||||||
|
|
||||||
while ( pCurrentItem != NULL ) {
|
|
||||||
pNextItem = pCurrentItem->next ;
|
|
||||||
del_channels_info (&pCurrentItem->info_hd);
|
|
||||||
RRM_FREE( pCurrentItem ) ;
|
|
||||||
pCurrentItem = pNextItem ;
|
|
||||||
}
|
|
||||||
|
|
||||||
*node_entry = NULL ;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief La fonction recherche le descripteur de noeud identifie par le noeud_id
|
|
||||||
dans la liste des noeuds
|
|
||||||
|
|
||||||
\return pointeur sur le descripteur de noeud trouve sinon NULL .
|
|
||||||
*/
|
|
||||||
Sens_node_t *get_node_info(
|
|
||||||
Sens_node_t *node_entry , ///< pointeur sur l'entree de la liste des noeuds
|
|
||||||
L2_ID *L2_id ///< Id du descripteur du noeud recherche
|
|
||||||
)
|
|
||||||
{
|
|
||||||
Sens_node_t *pCurrentItem = node_entry;
|
|
||||||
|
|
||||||
while ( pCurrentItem != NULL) {
|
|
||||||
if ( L2_ID_cmp( &(pCurrentItem->L2_id),L2_id) == 0 )
|
|
||||||
break ;
|
|
||||||
|
|
||||||
pCurrentItem = pCurrentItem->next ;
|
|
||||||
}
|
|
||||||
|
|
||||||
return pCurrentItem ;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief La fonction recherche le descripteur de noeud identifie par le noeud_id
|
|
||||||
dans la liste des noeuds
|
|
||||||
|
|
||||||
\return pointeur sur le descripteur de noeud trouve sinon NULL .
|
|
||||||
*/
|
|
||||||
Sens_ch_t *get_chann_info(
|
|
||||||
Sens_ch_t *ch_entry , ///< pointeur sur l'entree de la liste des canaux
|
|
||||||
unsigned int Ch_id ///< Id of the desired channel //mod_lor_10_03_17: intxflot
|
|
||||||
)
|
|
||||||
{
|
|
||||||
Sens_ch_t *pCurrentItem = ch_entry;
|
|
||||||
|
|
||||||
while ( pCurrentItem != NULL) {
|
|
||||||
if ( pCurrentItem->Ch_id == Ch_id)
|
|
||||||
break ;
|
|
||||||
|
|
||||||
pCurrentItem = pCurrentItem->next ;
|
|
||||||
}
|
|
||||||
|
|
||||||
return pCurrentItem ;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief La fonction rafraichit les information du sensing du noeud. Si c'est
|
|
||||||
la premiere fois qui le node envoye les info, il rajoute le node dans
|
|
||||||
la liste .
|
|
||||||
|
|
||||||
\return pointer to the node
|
|
||||||
*/
|
|
||||||
Sens_node_t *update_node_info(
|
|
||||||
Sens_node_t **node_entry, ///< pointeur sur un element de la liste des RB
|
|
||||||
L2_ID *L2_id, ///< id du noeud à refrechir
|
|
||||||
unsigned int NB_info, ///< Number of channel info
|
|
||||||
Sens_ch_t *ch_info_hd, ///< vector with the channel informations
|
|
||||||
double info_time ///< time au quel il vient mis à jour
|
|
||||||
)
|
|
||||||
{
|
|
||||||
Sens_node_t *pItem = get_node_info(*node_entry,L2_id);
|
|
||||||
|
|
||||||
|
|
||||||
if ( pItem != NULL) {
|
|
||||||
//printf ("node existing\n\n");//dbg
|
|
||||||
pItem->info_time = info_time ;
|
|
||||||
pItem->Nb_chan = NB_info ;
|
|
||||||
|
|
||||||
for ( int i=0; i<NB_info; i++ ) {
|
|
||||||
// printf ("node info: %d\n",i);//dbg
|
|
||||||
if ( update_channel_info( &(pItem->info_hd), ch_info_hd[i].Start_f,
|
|
||||||
ch_info_hd[i].Final_f, ch_info_hd[i].Ch_id, ch_info_hd[i].I0,ch_info_hd[i].mu0,ch_info_hd[i].mu1,//ch_info_hd[i].meas,
|
|
||||||
ch_info_hd[i].is_free) == NULL )
|
|
||||||
fprintf(stderr, "ERROR: info %d problem\n", i) ;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
//fprintf(stderr,"DBG2 passed node entry @%p \n", node_entry);//dbg
|
|
||||||
//fprintf(stderr,"DBG2 passed hd @%p \n", *node_entry); //dbg
|
|
||||||
//printf ("adding node\n\n");//dbg
|
|
||||||
pItem = add_node( node_entry, L2_id, NB_info, ch_info_hd, info_time);
|
|
||||||
}
|
|
||||||
|
|
||||||
//fprintf(stderr,"update_node\n");//dbg
|
|
||||||
PRINT_SENS_DB( *node_entry );
|
|
||||||
return pItem;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief La fonction rafraichit les information relatives à la mesure d'un canal. Si c'est
|
|
||||||
la premiere fois qu'on receive des info à propos du canal, il rajoute
|
|
||||||
le canal.
|
|
||||||
|
|
||||||
\return pointer to the channel
|
|
||||||
*/
|
|
||||||
Sens_ch_t *update_channel_info(
|
|
||||||
Sens_ch_t **ch_entry , ///< pointeur sur un element de la liste des RB
|
|
||||||
unsigned int Start_f , ///< frequence initial du canal //mod_lor_10_03_17: intxflot
|
|
||||||
unsigned int Final_f , ///< frequence final du canal //mod_lor_10_03_17: intxflot
|
|
||||||
unsigned int Ch_id , ///< ID du canal //mod_lor_10_03_17: intxflot
|
|
||||||
//mod_eure_lor++
|
|
||||||
char *I0 ,
|
|
||||||
char *mu0,
|
|
||||||
char *mu1,
|
|
||||||
|
|
||||||
//float meas , ///< Sensing results
|
|
||||||
unsigned int *is_free ///< Evaluation about the availability of the channel //mod_lor_10_05_28 ->char instead of int
|
|
||||||
//mod_eure_lor--
|
|
||||||
)
|
|
||||||
{
|
|
||||||
//printf("sens_db update passed ch_id: %d\n",Ch_id);//dbg
|
|
||||||
|
|
||||||
Sens_ch_t *pItem = get_chann_info(*ch_entry,Ch_id);
|
|
||||||
int i;
|
|
||||||
|
|
||||||
if ( pItem != NULL) {
|
|
||||||
// printf ("channel existing\n\n");//dbg
|
|
||||||
// printf("sens_db update1: %d ", pItem->Ch_id);//dbg
|
|
||||||
//mod_eure_lor++
|
|
||||||
memcpy( pItem->I0 ,I0, MAX_NUM_SB);
|
|
||||||
memcpy( pItem->mu0,mu0, MAX_NUM_SB);
|
|
||||||
memcpy( pItem->mu1,mu1, MAX_NUM_SB);
|
|
||||||
memcpy(pItem->is_free, is_free, MAX_NUM_SB*sizeof(unsigned int));
|
|
||||||
//pItem->meas = meas ;
|
|
||||||
//pItem->is_free = is_free ;//mod_lor_10_05_06
|
|
||||||
//for (i=0; i<NUM_SB;i++)
|
|
||||||
// printf ("sb %d is_free_db %d, is_free %d\n",i,pItem->is_free[i],is_free[i]);//dbg
|
|
||||||
// printf("sens_db update2: %d\n", pItem->Ch_id);//dbg
|
|
||||||
} else {
|
|
||||||
//printf ("channel to add\n\n");//dbg
|
|
||||||
//pItem = add_chann( ch_entry, Start_f, Final_f, Ch_id, meas, is_free);
|
|
||||||
pItem = add_chann( ch_entry, Start_f, Final_f, Ch_id, I0, mu0,mu1,is_free);
|
|
||||||
}
|
|
||||||
|
|
||||||
//mod_eure_lor--
|
|
||||||
|
|
||||||
return pItem;
|
|
||||||
}
|
|
||||||
|
|
||||||
//mod_lor_10_02_19++
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief La fonction rafraichit les parametres du sensing du noeud et, eventuelement,
|
|
||||||
les misurations. Si c'est la premiere fois qui le node envoye les info,
|
|
||||||
il rajoute le node dans la liste .
|
|
||||||
|
|
||||||
\return pointer to the node
|
|
||||||
*/
|
|
||||||
Sens_node_t *update_node_par(
|
|
||||||
Sens_node_t **node_entry , ///< pointeur sur un element de la liste des RB
|
|
||||||
L2_ID *L2_id , ///< id du noeud à refrechir
|
|
||||||
unsigned int NB_info , ///< Number of channel info
|
|
||||||
Sens_ch_t *ch_info_hd, ///< vector with the channel informations
|
|
||||||
double info_time , ///< time au quel il vient mis à jour
|
|
||||||
unsigned int tpc , ///< time on each carrier
|
|
||||||
unsigned int overlap , ///< overlap factor (percentage)
|
|
||||||
unsigned int sampl_freq ///< sampling frequency (Ms/s)
|
|
||||||
)
|
|
||||||
{
|
|
||||||
Sens_node_t *pItem = update_node_info(node_entry,L2_id,NB_info,ch_info_hd,info_time);
|
|
||||||
|
|
||||||
pItem->tpc = tpc;
|
|
||||||
pItem->overlap = overlap;
|
|
||||||
pItem->sampl_freq = sampl_freq;
|
|
||||||
|
|
||||||
//fprintf(stderr,"update_node\n");//dbg
|
|
||||||
PRINT_SENS_DB( *node_entry );
|
|
||||||
return pItem;
|
|
||||||
}
|
|
||||||
//mod_lor_10_02_19--
|
|
||||||
@@ -1,98 +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 sens_db.h
|
|
||||||
|
|
||||||
\brief Fichier d'entete contenant les declarations des types, des defines ,
|
|
||||||
et des fonctions relatives a la gestion de la base de donnée sur
|
|
||||||
les informations de sensing par chaque noeud avec capacité de sensing.
|
|
||||||
|
|
||||||
\author IACOBELLI Lorenzo
|
|
||||||
|
|
||||||
\date 16/10/09
|
|
||||||
|
|
||||||
|
|
||||||
\par Historique:
|
|
||||||
$Author$ $Date$ $Revision$
|
|
||||||
$Id$
|
|
||||||
$Log$
|
|
||||||
|
|
||||||
*******************************************************************************
|
|
||||||
*/
|
|
||||||
#ifndef SENS_DB_H
|
|
||||||
#define SENSE_DB_H
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief Entete de la file des messages reçus ou a envoyer
|
|
||||||
*/
|
|
||||||
typedef struct Sens_node_s {
|
|
||||||
L2_ID L2_id ; ///< id
|
|
||||||
double info_time ; ///< information age
|
|
||||||
unsigned int Nb_chan ; ///< number of channel informations
|
|
||||||
unsigned int tpc ; ///< time on each carrier //mod_lor_10_02_19
|
|
||||||
unsigned int overlap ; ///< overlap factor (percentage) //mod_lor_10_02_19
|
|
||||||
unsigned int sampl_freq; ///< sampling frequency (Ms/s) //mod_lor_10_02_19
|
|
||||||
Sens_ch_t *info_hd ; ///< header of the information list
|
|
||||||
struct Sens_node_s *next ; ///< next node pointer
|
|
||||||
} Sens_node_t ;
|
|
||||||
|
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
|
||||||
|
|
||||||
|
|
||||||
Sens_node_t *add_node( Sens_node_t **node_entry, L2_ID *L2_id, unsigned int NB_info, Sens_ch_t *ch_info_hd, double info_time ) ;
|
|
||||||
Sens_ch_t *add_chann( Sens_ch_t **ch_entry, unsigned int Start_f, unsigned int Final_f, unsigned int Ch_id, char *I0 ,char *mu0, char *mu1,
|
|
||||||
unsigned int *is_free); //mod_lor_10_05_28 ->char instead of int
|
|
||||||
void del_channels_info( Sens_ch_t **ch_info_entry);
|
|
||||||
void del_node( Sens_node_t **node_entry, L2_ID *L2_id ) ;
|
|
||||||
void del_all_nodes( Sens_node_t **node_entry ) ;
|
|
||||||
Sens_node_t *get_node_info ( Sens_node_t *node_entry, L2_ID *L2_id ) ;
|
|
||||||
Sens_ch_t *get_chann_info( Sens_ch_t *ch_entry , unsigned int Ch_id); //mod_lor_10_03_17: intxflot
|
|
||||||
Sens_node_t *update_node_info( Sens_node_t **node_entry, L2_ID *L2_id, unsigned int NB_info, Sens_ch_t *ch_info_hd, double info_time);
|
|
||||||
Sens_node_t *update_node_par( Sens_node_t **node_entry, L2_ID *L2_id, unsigned int NB_info, Sens_ch_t *ch_info_hd, double info_time,
|
|
||||||
unsigned int tpc, unsigned int overlap, unsigned int sampl_freq); //mod_lor_10_02_19 : function creation
|
|
||||||
//Sens_ch_t *update_channel_info( Sens_ch_t **ch_entry, unsigned int Start_f, unsigned int Final_f, unsigned int Ch_id, float meas, unsigned int is_free );//mod_lor_10_05_28 ->char instead of int
|
|
||||||
Sens_ch_t *update_channel_info( Sens_ch_t **ch_entry, unsigned int Start_f, unsigned int Final_f, unsigned int Ch_id, char *I0 ,char *mu0, char *mu1,
|
|
||||||
unsigned int *is_free ); //mod_lor_10_05_28 ->char instead of int
|
|
||||||
void print_sens_db( Sens_node_t *pEntry );
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif /* SENS_DB_H */
|
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -1,125 +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 sens_op.h
|
|
||||||
|
|
||||||
\brief Fichier d'entete contenant les declarations des types, des defines ,
|
|
||||||
et des fonctions relatives a la gestion du channel sensing.
|
|
||||||
|
|
||||||
\author IACOBELLI Lorenzo
|
|
||||||
|
|
||||||
\date 21/10/09
|
|
||||||
|
|
||||||
|
|
||||||
\par Historique:
|
|
||||||
$Author$ $Date$ $Revision$
|
|
||||||
$Id$
|
|
||||||
$Log$
|
|
||||||
|
|
||||||
*******************************************************************************
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef SENS_OP_H
|
|
||||||
#define SENS_OP_H
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
//mod_lor_10_05_28: declaration of function for sensing and frequency allocation
|
|
||||||
unsigned int evalaute_sens_info(
|
|
||||||
Sens_node_t *Sens_db,
|
|
||||||
unsigned int Start_f,
|
|
||||||
unsigned int Final_f
|
|
||||||
);
|
|
||||||
|
|
||||||
void take_decision(
|
|
||||||
Sens_node_t *SensDB , //!< pointer to the sensing database
|
|
||||||
unsigned int Ch_id , //!< channel ID
|
|
||||||
unsigned int *is_free //mod_lor_10_05_28 ->char instead of int
|
|
||||||
|
|
||||||
);
|
|
||||||
|
|
||||||
unsigned int take_decision_sens(
|
|
||||||
Sens_node_t *SensDB , //!< pointer to the sensing database
|
|
||||||
Sens_ch_t *finalSensChann, //!< info that will be returned after decision
|
|
||||||
unsigned int Ch_id //!< channel ID
|
|
||||||
|
|
||||||
);
|
|
||||||
|
|
||||||
unsigned int find_available_channels(
|
|
||||||
Sens_node_t *Sens_db,
|
|
||||||
CHANNELS_DB_T **channels_db
|
|
||||||
);
|
|
||||||
|
|
||||||
unsigned int evalaute_sens_info(
|
|
||||||
Sens_node_t *Sens_db,
|
|
||||||
unsigned int Start_f,
|
|
||||||
unsigned int Final_f
|
|
||||||
);
|
|
||||||
|
|
||||||
unsigned int check_SN_channels(
|
|
||||||
Sens_node_t *Sens_db,
|
|
||||||
CHANNELS_DB_T *channels_db,
|
|
||||||
unsigned int *used_channels,
|
|
||||||
unsigned int nb_used_ch
|
|
||||||
);
|
|
||||||
|
|
||||||
void take_local_decision(
|
|
||||||
Sens_ch_t *Sens_info
|
|
||||||
);
|
|
||||||
|
|
||||||
unsigned int take_ch_coll_decision(
|
|
||||||
Sens_node_t *SensDB , //!< pointer to the sensing database
|
|
||||||
Sens_ch_t *finalSensChann, //!< info that will be returned after decision
|
|
||||||
unsigned int Ch_id //!< channel ID
|
|
||||||
);
|
|
||||||
|
|
||||||
int check_allocated_channels(
|
|
||||||
Instance_t inst , //!< Identification de l'instance
|
|
||||||
L2_ID *User_active_L2_id ,
|
|
||||||
L2_ID *User_dest_L2_id ,
|
|
||||||
int *free_av
|
|
||||||
);
|
|
||||||
|
|
||||||
int count_free_channels(
|
|
||||||
Instance_t inst , //!< Identification de l'instance
|
|
||||||
int *free_av
|
|
||||||
);
|
|
||||||
// ---------------------------------------------------------------------------
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif /* SENS_OP_H */
|
|
||||||
@@ -1,62 +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
|
|
||||||
|
|
||||||
*******************************************************************************/
|
|
||||||
|
|
||||||
/* Form definition file generated with fdesign. */
|
|
||||||
|
|
||||||
#include "forms.h"
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include "sens_scen_2_form.h"
|
|
||||||
|
|
||||||
FD_sens_scen_2 *create_form_sens_scen_2(void)
|
|
||||||
{
|
|
||||||
FL_OBJECT *obj;
|
|
||||||
FD_sens_scen_2 *fdui = (FD_sens_scen_2 *) fl_calloc(1, sizeof(*fdui));
|
|
||||||
|
|
||||||
fdui->sens_scen_2 = fl_bgn_form(FL_NO_BOX, 460, 280);
|
|
||||||
obj = fl_add_box(FL_UP_BOX,0,0,460,280,"");
|
|
||||||
fdui->User_1 = obj = fl_add_xyplot(FL_IMPULSE_XYPLOT,20,10,420,100,"User_1");
|
|
||||||
fl_set_object_color(obj,FL_BLACK,FL_PALEGREEN);
|
|
||||||
fl_set_object_lsize(obj,FL_NORMAL_SIZE);
|
|
||||||
/* fdui->User_3 = obj = fl_add_xyplot(FL_IMPULSE_XYPLOT,80,340,600,120,"User_3");
|
|
||||||
fl_set_object_color(obj,FL_BLACK,FL_BLUE);
|
|
||||||
fl_set_object_lsize(obj,FL_NORMAL_SIZE);
|
|
||||||
fdui->User_4 = obj = fl_add_xyplot(FL_IMPULSE_XYPLOT,80,490,600,120,"User_4");
|
|
||||||
fl_set_object_color(obj,FL_BLACK,FL_BLUE);
|
|
||||||
fl_set_object_lsize(obj,FL_NORMAL_SIZE);*/
|
|
||||||
fdui->User_2 = obj = fl_add_xyplot(FL_IMPULSE_XYPLOT,20,140,420,100,"User_2");
|
|
||||||
fl_set_object_color(obj,FL_BLACK,FL_PALEGREEN);
|
|
||||||
fl_set_object_lsize(obj,FL_NORMAL_SIZE);
|
|
||||||
fl_end_form();
|
|
||||||
|
|
||||||
fdui->sens_scen_2->fdui = fdui;
|
|
||||||
|
|
||||||
return fdui;
|
|
||||||
}
|
|
||||||
/*---------------------------------------*/
|
|
||||||
|
|
||||||
@@ -1,106 +0,0 @@
|
|||||||
Magic: 13000
|
|
||||||
|
|
||||||
Internal Form Definition File
|
|
||||||
(do not change)
|
|
||||||
|
|
||||||
Number of forms: 1
|
|
||||||
Unit of measure: FL_COORD_PIXEL
|
|
||||||
|
|
||||||
=============== FORM ===============
|
|
||||||
Name: sens_scen_2
|
|
||||||
Width: 740
|
|
||||||
Height: 650
|
|
||||||
Number of Objects: 5
|
|
||||||
|
|
||||||
--------------------
|
|
||||||
class: FL_BOX
|
|
||||||
type: UP_BOX
|
|
||||||
box: 0 0 740 650
|
|
||||||
boxtype: FL_UP_BOX
|
|
||||||
colors: FL_COL1 FL_COL1
|
|
||||||
alignment: FL_ALIGN_CENTER
|
|
||||||
style: FL_NORMAL_STYLE
|
|
||||||
size: FL_DEFAULT_SIZE
|
|
||||||
lcol: FL_BLACK
|
|
||||||
label:
|
|
||||||
shortcut:
|
|
||||||
resize: FL_RESIZE_ALL
|
|
||||||
gravity: FL_NoGravity FL_NoGravity
|
|
||||||
name:
|
|
||||||
callback:
|
|
||||||
argument:
|
|
||||||
|
|
||||||
--------------------
|
|
||||||
class: FL_XYPLOT
|
|
||||||
type: IMPULSE_XYPLOT
|
|
||||||
box: 80 20 600 120
|
|
||||||
boxtype: FL_FLAT_BOX
|
|
||||||
colors: FL_BLACK FL_BLUE
|
|
||||||
alignment: FL_ALIGN_BOTTOM
|
|
||||||
style: FL_NORMAL_STYLE
|
|
||||||
size: FL_NORMAL_SIZE
|
|
||||||
lcol: FL_BLACK
|
|
||||||
label: User_1
|
|
||||||
shortcut:
|
|
||||||
resize: FL_RESIZE_ALL
|
|
||||||
gravity: FL_NoGravity FL_NoGravity
|
|
||||||
name: User_1
|
|
||||||
callback:
|
|
||||||
argument:
|
|
||||||
|
|
||||||
--------------------
|
|
||||||
class: FL_XYPLOT
|
|
||||||
type: IMPULSE_XYPLOT
|
|
||||||
box: 80 340 600 120
|
|
||||||
boxtype: FL_FLAT_BOX
|
|
||||||
colors: FL_BLACK FL_BLUE
|
|
||||||
alignment: FL_ALIGN_BOTTOM
|
|
||||||
style: FL_NORMAL_STYLE
|
|
||||||
size: FL_NORMAL_SIZE
|
|
||||||
lcol: FL_BLACK
|
|
||||||
label: User_3
|
|
||||||
shortcut:
|
|
||||||
resize: FL_RESIZE_ALL
|
|
||||||
gravity: FL_NoGravity FL_NoGravity
|
|
||||||
name: User_3
|
|
||||||
callback:
|
|
||||||
argument:
|
|
||||||
|
|
||||||
--------------------
|
|
||||||
class: FL_XYPLOT
|
|
||||||
type: IMPULSE_XYPLOT
|
|
||||||
box: 80 490 600 120
|
|
||||||
boxtype: FL_FLAT_BOX
|
|
||||||
colors: FL_BLACK FL_BLUE
|
|
||||||
alignment: FL_ALIGN_BOTTOM
|
|
||||||
style: FL_NORMAL_STYLE
|
|
||||||
size: FL_NORMAL_SIZE
|
|
||||||
lcol: FL_BLACK
|
|
||||||
label: User_4
|
|
||||||
shortcut:
|
|
||||||
resize: FL_RESIZE_ALL
|
|
||||||
gravity: FL_NoGravity FL_NoGravity
|
|
||||||
name: User_4
|
|
||||||
callback:
|
|
||||||
argument:
|
|
||||||
|
|
||||||
--------------------
|
|
||||||
class: FL_XYPLOT
|
|
||||||
type: IMPULSE_XYPLOT
|
|
||||||
box: 80 180 600 120
|
|
||||||
boxtype: FL_FLAT_BOX
|
|
||||||
colors: FL_BLACK FL_BLUE
|
|
||||||
alignment: FL_ALIGN_BOTTOM
|
|
||||||
style: FL_NORMAL_STYLE
|
|
||||||
size: FL_NORMAL_SIZE
|
|
||||||
lcol: FL_BLACK
|
|
||||||
label: User_2
|
|
||||||
shortcut:
|
|
||||||
resize: FL_RESIZE_ALL
|
|
||||||
gravity: FL_NoGravity FL_NoGravity
|
|
||||||
name: User_2
|
|
||||||
callback:
|
|
||||||
argument:
|
|
||||||
|
|
||||||
==============================
|
|
||||||
create_the_forms
|
|
||||||
@@ -1,52 +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
|
|
||||||
|
|
||||||
*******************************************************************************/
|
|
||||||
|
|
||||||
/** Header file generated with fdesign on Thu Nov 4 18:36:46 2010.**/
|
|
||||||
|
|
||||||
#ifndef FD_sens_scen_2_h_
|
|
||||||
#define FD_sens_scen_2_h_
|
|
||||||
|
|
||||||
/** Callbacks, globals and object handlers **/
|
|
||||||
|
|
||||||
|
|
||||||
/**** Forms and Objects ****/
|
|
||||||
typedef struct {
|
|
||||||
FL_FORM *sens_scen_2;
|
|
||||||
void *vdata;
|
|
||||||
char *cdata;
|
|
||||||
long ldata;
|
|
||||||
FL_OBJECT *User_1;
|
|
||||||
FL_OBJECT *User_3;
|
|
||||||
FL_OBJECT *User_4;
|
|
||||||
FL_OBJECT *User_2;
|
|
||||||
} FD_sens_scen_2;
|
|
||||||
|
|
||||||
extern FD_sens_scen_2 * create_form_sens_scen_2(void);
|
|
||||||
|
|
||||||
#endif /* FD_sens_scen_2_h_ */
|
|
||||||
@@ -1,53 +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
|
|
||||||
|
|
||||||
*******************************************************************************/
|
|
||||||
|
|
||||||
/* Form definition file generated with fdesign. */
|
|
||||||
|
|
||||||
#include "forms.h"
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include "sens_sensor.h"
|
|
||||||
|
|
||||||
FD_sens_sensor *create_form_sens_sensor(void)
|
|
||||||
{
|
|
||||||
FL_OBJECT *obj;
|
|
||||||
FD_sens_sensor *fdui = (FD_sens_sensor *) fl_calloc(1, sizeof(*fdui));
|
|
||||||
|
|
||||||
fdui->sens_sensor = fl_bgn_form(FL_NO_BOX, 940, 280);
|
|
||||||
obj = fl_add_box(FL_UP_BOX,0,0,940,280,"");
|
|
||||||
fdui->local_sensing_results = obj = fl_add_xyplot(FL_IMPULSE_XYPLOT,30,30,880,210,"Local Sensing Results");
|
|
||||||
fl_set_object_color(obj,FL_BLACK,FL_BLUE);
|
|
||||||
fl_set_object_lsize(obj,FL_NORMAL_SIZE);
|
|
||||||
fl_end_form();
|
|
||||||
|
|
||||||
fdui->sens_sensor->fdui = fdui;
|
|
||||||
|
|
||||||
return fdui;
|
|
||||||
}
|
|
||||||
/*---------------------------------------*/
|
|
||||||
|
|
||||||
@@ -1,52 +0,0 @@
|
|||||||
Magic: 13000
|
|
||||||
|
|
||||||
Internal Form Definition File
|
|
||||||
(do not change)
|
|
||||||
|
|
||||||
Number of forms: 1
|
|
||||||
Unit of measure: FL_COORD_PIXEL
|
|
||||||
|
|
||||||
=============== FORM ===============
|
|
||||||
Name: sens_sensor
|
|
||||||
Width: 940
|
|
||||||
Height: 280
|
|
||||||
Number of Objects: 2
|
|
||||||
|
|
||||||
--------------------
|
|
||||||
class: FL_BOX
|
|
||||||
type: UP_BOX
|
|
||||||
box: 0 0 940 280
|
|
||||||
boxtype: FL_UP_BOX
|
|
||||||
colors: FL_COL1 FL_COL1
|
|
||||||
alignment: FL_ALIGN_CENTER
|
|
||||||
style: FL_NORMAL_STYLE
|
|
||||||
size: FL_DEFAULT_SIZE
|
|
||||||
lcol: FL_BLACK
|
|
||||||
label:
|
|
||||||
shortcut:
|
|
||||||
resize: FL_RESIZE_ALL
|
|
||||||
gravity: FL_NoGravity FL_NoGravity
|
|
||||||
name:
|
|
||||||
callback:
|
|
||||||
argument:
|
|
||||||
|
|
||||||
--------------------
|
|
||||||
class: FL_XYPLOT
|
|
||||||
type: IMPULSE_XYPLOT
|
|
||||||
box: 30 30 880 210
|
|
||||||
boxtype: FL_FLAT_BOX
|
|
||||||
colors: FL_BLACK FL_BLUE
|
|
||||||
alignment: FL_ALIGN_BOTTOM
|
|
||||||
style: FL_NORMAL_STYLE
|
|
||||||
size: FL_NORMAL_SIZE
|
|
||||||
lcol: FL_BLACK
|
|
||||||
label: Local Sensing Results
|
|
||||||
shortcut:
|
|
||||||
resize: FL_RESIZE_ALL
|
|
||||||
gravity: FL_NoGravity FL_NoGravity
|
|
||||||
name: local_sensing_results
|
|
||||||
callback:
|
|
||||||
argument:
|
|
||||||
|
|
||||||
==============================
|
|
||||||
create_the_forms
|
|
||||||
@@ -1,49 +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
|
|
||||||
|
|
||||||
*******************************************************************************/
|
|
||||||
|
|
||||||
/** Header file generated with fdesign on Fri Feb 18 14:31:56 2011.**/
|
|
||||||
|
|
||||||
#ifndef FD_sens_sensor_h_
|
|
||||||
#define FD_sens_sensor_h_
|
|
||||||
|
|
||||||
/** Callbacks, globals and object handlers **/
|
|
||||||
|
|
||||||
|
|
||||||
/**** Forms and Objects ****/
|
|
||||||
typedef struct {
|
|
||||||
FL_FORM *sens_sensor;
|
|
||||||
void *vdata;
|
|
||||||
char *cdata;
|
|
||||||
long ldata;
|
|
||||||
FL_OBJECT *local_sensing_results;
|
|
||||||
} FD_sens_sensor;
|
|
||||||
|
|
||||||
extern FD_sens_sensor * create_form_sens_sensor(void);
|
|
||||||
|
|
||||||
#endif /* FD_sens_sensor_h_ */
|
|
||||||
@@ -1,151 +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 rrc_2_rrm_msg.c
|
|
||||||
|
|
||||||
\brief Fonctions permettant le formattage des donnees pour l'envoi d'un
|
|
||||||
message sur le socket entre le SENSING et le RRM -> to use in emulation of sensing unit
|
|
||||||
|
|
||||||
\author IACOBELLI Lorenzo
|
|
||||||
|
|
||||||
\date 15/04/10
|
|
||||||
|
|
||||||
|
|
||||||
\par Historique:
|
|
||||||
|
|
||||||
|
|
||||||
*******************************************************************************
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifdef SNS_EMUL
|
|
||||||
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <sys/socket.h>
|
|
||||||
#include <sys/un.h>
|
|
||||||
#include "L3_rrc_defs.h"
|
|
||||||
#include "rrm_sock.h"
|
|
||||||
#include "L3_rrc_interface.h"
|
|
||||||
#include "rrc_rrm_msg.h"
|
|
||||||
#include "rrm_util.h"
|
|
||||||
|
|
||||||
#else
|
|
||||||
|
|
||||||
#include "defs.h"
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "L3_rrc_defs.h"
|
|
||||||
|
|
||||||
#include "rrm_sock.h"
|
|
||||||
#include "sensing_rrm_msg.h"
|
|
||||||
#include "rrm_util.h"
|
|
||||||
|
|
||||||
msg_t mesg;
|
|
||||||
|
|
||||||
#ifdef TRACE
|
|
||||||
//! Macro creant la chaine a partir du nom de la variable
|
|
||||||
#define STRINGIZER(x) #x
|
|
||||||
//! Tableau pour le mode trace faisant la translation entre le numero et le nom du message
|
|
||||||
const char *Str_msg_sns_rrm[NB_MSG_SNS_RRM] = {
|
|
||||||
STRINGIZER(SNS_UPDATE_SENS ),
|
|
||||||
STRINGIZER(RRM_SCAN_ORD ),
|
|
||||||
STRINGIZER(RRM_END_SCAN_ORD ),
|
|
||||||
STRINGIZER(SNS_END_SCAN_CONF )
|
|
||||||
} ;
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief This function initialize the message header
|
|
||||||
\return any return value
|
|
||||||
*/
|
|
||||||
static void init_sensing_msg_head(
|
|
||||||
msg_head_t *msg_head , //!< message header to initialize
|
|
||||||
Instance_t inst , //!< Instance ID
|
|
||||||
MSG_SENSING_RRM_T msg_type , //!< type of message to initialize
|
|
||||||
unsigned int size , //!< size of message
|
|
||||||
Transaction_t Trans_id //!< transaction id associated to this message
|
|
||||||
)
|
|
||||||
{
|
|
||||||
if ( msg_head != NULL ) {
|
|
||||||
msg_head->start = START_MSG ;
|
|
||||||
msg_head->msg_type = 0xFF & msg_type ;
|
|
||||||
msg_head->inst = inst ;
|
|
||||||
msg_head->Trans_id = Trans_id ;
|
|
||||||
msg_head->size = size;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*****************************************************************************/
|
|
||||||
|
|
||||||
rrc_update_sens_t P_update_sens;
|
|
||||||
msg_t * msg_sensing_update_sens(
|
|
||||||
Instance_t inst , //!< Instance ID
|
|
||||||
Sens_ch_t *Sens,
|
|
||||||
unsigned char NB_info
|
|
||||||
)
|
|
||||||
{
|
|
||||||
|
|
||||||
init_sensing_msg_head(&(mesg.head),inst, SNS_UPDATE_SENS, sizeof( rrc_update_sens_t ) ,0);
|
|
||||||
memcpy( &P_update_sens.Sens_meas[0], (rrc_update_sens_t *)Sens, NB_info*sizeof(Sens_ch_t) ) ;
|
|
||||||
P_update_sens.NB_info=NB_info;
|
|
||||||
mesg.data = (char *) &P_update_sens;
|
|
||||||
return &mesg ;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/*****************************************************************************/
|
|
||||||
|
|
||||||
msg_t * msg_sensing_end_scan_conf(
|
|
||||||
Instance_t inst //!< Instance ID
|
|
||||||
)
|
|
||||||
{
|
|
||||||
|
|
||||||
init_sensing_msg_head(&(mesg.head),inst, SNS_END_SCAN_CONF, 0 ,0);
|
|
||||||
|
|
||||||
mesg.data = NULL;
|
|
||||||
return &mesg ;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1,62 +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
|
|
||||||
|
|
||||||
*******************************************************************************/
|
|
||||||
|
|
||||||
/* Form definition file generated with fdesign. */
|
|
||||||
|
|
||||||
#include "forms.h"
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include "sensing_form.h"
|
|
||||||
|
|
||||||
FD_sensing_form *create_form_sensing_form(void)
|
|
||||||
{
|
|
||||||
FL_OBJECT *obj;
|
|
||||||
FD_sensing_form *fdui = (FD_sensing_form *) fl_calloc(1, sizeof(*fdui));
|
|
||||||
|
|
||||||
fdui->sensing_form = fl_bgn_form(FL_NO_BOX, 620, 600);
|
|
||||||
obj = fl_add_box(FL_UP_BOX,0,0,620,600,"");
|
|
||||||
fdui->spec_SN1 = obj = fl_add_xyplot(FL_IMPULSE_XYPLOT,70,50,500,100,"spectrum_plot_SN1");
|
|
||||||
fl_set_object_color(obj,FL_BLACK,FL_BLUE);
|
|
||||||
fl_set_object_lsize(obj,FL_NORMAL_SIZE);
|
|
||||||
fdui->spec_SN2 = obj = fl_add_xyplot(FL_IMPULSE_XYPLOT,70,180,500,100,"spectrum_plot_SN2");
|
|
||||||
fl_set_object_color(obj,FL_BLACK,FL_BLUE);
|
|
||||||
fl_set_object_lsize(obj,FL_NORMAL_SIZE);
|
|
||||||
fdui->spec_SN3 = obj = fl_add_xyplot(FL_IMPULSE_XYPLOT,70,310,500,100,"spectrum_plot_SN3");
|
|
||||||
fl_set_object_color(obj,FL_BLACK,FL_BLUE);
|
|
||||||
fl_set_object_lsize(obj,FL_NORMAL_SIZE);
|
|
||||||
fdui->Secondary_Network_frequencies = obj = fl_add_xyplot(FL_IMPULSE_XYPLOT,70,460,500,100,"Secondary_Network_frequencies");
|
|
||||||
fl_set_object_color(obj,FL_BLACK,FL_GREEN);
|
|
||||||
fl_set_object_lsize(obj,FL_NORMAL_SIZE);
|
|
||||||
fl_end_form();
|
|
||||||
|
|
||||||
fdui->sensing_form->fdui = fdui;
|
|
||||||
|
|
||||||
return fdui;
|
|
||||||
}
|
|
||||||
/*---------------------------------------*/
|
|
||||||
|
|
||||||
@@ -1,106 +0,0 @@
|
|||||||
Magic: 13000
|
|
||||||
|
|
||||||
Internal Form Definition File
|
|
||||||
(do not change)
|
|
||||||
|
|
||||||
Number of forms: 1
|
|
||||||
Unit of measure: FL_COORD_PIXEL
|
|
||||||
|
|
||||||
=============== FORM ===============
|
|
||||||
Name: sensing_form
|
|
||||||
Width: 620
|
|
||||||
Height: 600
|
|
||||||
Number of Objects: 5
|
|
||||||
|
|
||||||
--------------------
|
|
||||||
class: FL_BOX
|
|
||||||
type: UP_BOX
|
|
||||||
box: 0 0 620 600
|
|
||||||
boxtype: FL_UP_BOX
|
|
||||||
colors: FL_COL1 FL_COL1
|
|
||||||
alignment: FL_ALIGN_CENTER
|
|
||||||
style: FL_NORMAL_STYLE
|
|
||||||
size: FL_DEFAULT_SIZE
|
|
||||||
lcol: FL_BLACK
|
|
||||||
label:
|
|
||||||
shortcut:
|
|
||||||
resize: FL_RESIZE_ALL
|
|
||||||
gravity: FL_NoGravity FL_NoGravity
|
|
||||||
name:
|
|
||||||
callback:
|
|
||||||
argument:
|
|
||||||
|
|
||||||
--------------------
|
|
||||||
class: FL_XYPLOT
|
|
||||||
type: IMPULSE_XYPLOT
|
|
||||||
box: 70 20 500 100
|
|
||||||
boxtype: FL_FLAT_BOX
|
|
||||||
colors: FL_BLACK FL_BLUE
|
|
||||||
alignment: FL_ALIGN_BOTTOM
|
|
||||||
style: FL_NORMAL_STYLE
|
|
||||||
size: FL_NORMAL_SIZE
|
|
||||||
lcol: FL_BLACK
|
|
||||||
label: spectrum_plot_SN1
|
|
||||||
shortcut:
|
|
||||||
resize: FL_RESIZE_ALL
|
|
||||||
gravity: FL_NoGravity FL_NoGravity
|
|
||||||
name: spec_SN1
|
|
||||||
callback:
|
|
||||||
argument:
|
|
||||||
|
|
||||||
--------------------
|
|
||||||
class: FL_XYPLOT
|
|
||||||
type: IMPULSE_XYPLOT
|
|
||||||
box: 70 150 500 100
|
|
||||||
boxtype: FL_FLAT_BOX
|
|
||||||
colors: FL_BLACK FL_BLUE
|
|
||||||
alignment: FL_ALIGN_BOTTOM
|
|
||||||
style: FL_NORMAL_STYLE
|
|
||||||
size: FL_NORMAL_SIZE
|
|
||||||
lcol: FL_BLACK
|
|
||||||
label: spectrum_plot_SN2
|
|
||||||
shortcut:
|
|
||||||
resize: FL_RESIZE_ALL
|
|
||||||
gravity: FL_NoGravity FL_NoGravity
|
|
||||||
name: spec_SN2
|
|
||||||
callback:
|
|
||||||
argument:
|
|
||||||
|
|
||||||
--------------------
|
|
||||||
class: FL_XYPLOT
|
|
||||||
type: IMPULSE_XYPLOT
|
|
||||||
box: 70 280 500 100
|
|
||||||
boxtype: FL_FLAT_BOX
|
|
||||||
colors: FL_BLACK FL_BLUE
|
|
||||||
alignment: FL_ALIGN_BOTTOM
|
|
||||||
style: FL_NORMAL_STYLE
|
|
||||||
size: FL_NORMAL_SIZE
|
|
||||||
lcol: FL_BLACK
|
|
||||||
label: spectrum_plot_SN3
|
|
||||||
shortcut:
|
|
||||||
resize: FL_RESIZE_ALL
|
|
||||||
gravity: FL_NoGravity FL_NoGravity
|
|
||||||
name: spec_SN3
|
|
||||||
callback:
|
|
||||||
argument:
|
|
||||||
|
|
||||||
--------------------
|
|
||||||
class: FL_XYPLOT
|
|
||||||
type: NORMAL_XYPLOT
|
|
||||||
box: 70 430 500 110
|
|
||||||
boxtype: FL_FLAT_BOX
|
|
||||||
colors: FL_BLACK FL_GREEN
|
|
||||||
alignment: FL_ALIGN_BOTTOM
|
|
||||||
style: FL_NORMAL_STYLE
|
|
||||||
size: FL_TINY_SIZE
|
|
||||||
lcol: FL_BLACK
|
|
||||||
label:
|
|
||||||
shortcut:
|
|
||||||
resize: FL_RESIZE_ALL
|
|
||||||
gravity: FL_NoGravity FL_NoGravity
|
|
||||||
name: Secondary_Network_frequencies
|
|
||||||
callback:
|
|
||||||
argument:
|
|
||||||
|
|
||||||
==============================
|
|
||||||
create_the_forms
|
|
||||||
@@ -1,52 +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
|
|
||||||
|
|
||||||
*******************************************************************************/
|
|
||||||
|
|
||||||
/** Header file generated with fdesign on Tue Jun 1 11:00:12 2010.**/
|
|
||||||
|
|
||||||
#ifndef FD_sensing_form_h_
|
|
||||||
#define FD_sensing_form_h_
|
|
||||||
|
|
||||||
/** Callbacks, globals and object handlers **/
|
|
||||||
|
|
||||||
|
|
||||||
/**** Forms and Objects ****/
|
|
||||||
typedef struct {
|
|
||||||
FL_FORM *sensing_form;
|
|
||||||
void *vdata;
|
|
||||||
char *cdata;
|
|
||||||
long ldata;
|
|
||||||
FL_OBJECT *spec_SN1;
|
|
||||||
FL_OBJECT *spec_SN2;
|
|
||||||
FL_OBJECT *spec_SN3;
|
|
||||||
FL_OBJECT *Secondary_Network_frequencies;
|
|
||||||
} FD_sensing_form;
|
|
||||||
|
|
||||||
extern FD_sensing_form * create_form_sensing_form(void);
|
|
||||||
|
|
||||||
#endif /* FD_sensing_form_h_ */
|
|
||||||
@@ -1,126 +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 sensing_msg.h
|
|
||||||
|
|
||||||
\brief Fichier d'entete contenant les declarations des types, des defines ,
|
|
||||||
et des fonctions relatives aux messages RRC-RRM ou RRC-RRCI.
|
|
||||||
|
|
||||||
Les fonctions servent à créer le buffer de message, remplir
|
|
||||||
l'entete et copier les parametres de fonction. Chaque fonction
|
|
||||||
retourne le message qui pourra être envoye sur le socket entre le
|
|
||||||
CMM et le RRM ou RRCI.
|
|
||||||
|
|
||||||
\author BURLOT Pascal
|
|
||||||
|
|
||||||
\date 17/07/08
|
|
||||||
|
|
||||||
\par Historique:
|
|
||||||
L.IACOBELLI 2009-10-19
|
|
||||||
+ sensing messages
|
|
||||||
|
|
||||||
*******************************************************************************
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef __SENSING_RRM_MSG_H
|
|
||||||
#define __SENSING_RRM_MSG_H
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef OPENAIR2_IN
|
|
||||||
#include "rrm_sock.h"
|
|
||||||
#else
|
|
||||||
#include "RRC/MESH/rrc_rrm_interface.h"
|
|
||||||
#include "RRC/MESH/L3_rrc_defs.h"
|
|
||||||
#endif
|
|
||||||
//#include "../../../openair2/RRC/MESH/rrc_rrm_interface.h"
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief Enumeration des messages entre RRM/RRCI et le RRC
|
|
||||||
*/
|
|
||||||
typedef enum {
|
|
||||||
SNS_UPDATE_SENS , ///< Message SENSING->RRM : update of the sensing information measured by the nodes
|
|
||||||
RRM_SCAN_ORD , ///< Message RRM->SENSING : order to scann indicated channels
|
|
||||||
RRM_END_SCAN_ORD , ///< Message RRM->SENSING : end of a scanning process in sensors
|
|
||||||
SNS_END_SCAN_CONF , ///< Message SENSING->RRC : end of a scanning process in sensors
|
|
||||||
NB_MSG_SNS_RRM ///< Nombre de message RRM-SENSING
|
|
||||||
}
|
|
||||||
MSG_SENSING_RRM_T ;
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief Definition des parametres de la fonction rrm_scan_ord() dans
|
|
||||||
une structure permettant le passage des parametres via un socket
|
|
||||||
*/
|
|
||||||
typedef struct {
|
|
||||||
|
|
||||||
unsigned int NB_chan ; ///< Number of channels to scan if 0 means all channels
|
|
||||||
unsigned int Meas_tpf ; ///< time on each carrier //mod_lor_10_02_19
|
|
||||||
unsigned int Overlap ; ///< overlap factor (percentage) //mod_lor_10_02_19
|
|
||||||
unsigned int Sampl_nb ; ///< number of samples per sub-band //mod_lor_10_04_01
|
|
||||||
Sens_ch_t ch_to_scan[NB_SENS_MAX] ; ///< Vector of channels to scan //mod_lor_10_02_19
|
|
||||||
} rrm_scan_ord_t ;
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief Definition des parametres de la fonction rrm_end_scan_ord() dans
|
|
||||||
une structure permettant le passage des parametres via un socket
|
|
||||||
*/
|
|
||||||
typedef struct {
|
|
||||||
unsigned int NB_chan ; //!< Number of channels
|
|
||||||
unsigned int channels[NB_SENS_MAX]; //!< Vector of channels
|
|
||||||
} rrm_end_scan_ord_t ;
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief Definition des parametres de les fonctions rrc_update_sens()
|
|
||||||
rdans une structure permettant le passage
|
|
||||||
des parametres via un socket
|
|
||||||
*/
|
|
||||||
typedef struct {
|
|
||||||
double info_time ; //!< Date of the message
|
|
||||||
L2_ID L2_id ; //!< Layer 2 ID (MAC) of sensing node
|
|
||||||
unsigned int NB_info ; //!< number of sensed channels
|
|
||||||
Sens_ch_t Sens_meas[NB_SENS_MAX] ; //!< sensing information
|
|
||||||
} rrc_update_sens_t;
|
|
||||||
|
|
||||||
|
|
||||||
msg_t *msg_rrm_scan_ord( Instance_t inst, unsigned int NB_chan, unsigned int Meas_tpf, unsigned int Overlap,
|
|
||||||
unsigned int Sampl_nb, Sens_ch_t *ch_to_scan, Transaction_t Trans_id ); //mod_lor_10_02_19
|
|
||||||
msg_t *msg_rrm_end_scan_ord(Instance_t inst, unsigned int NB_chan, unsigned int *channels,
|
|
||||||
Transaction_t Trans_id );
|
|
||||||
|
|
||||||
#endif /* SENSING_MSG_H */
|
|
||||||
@@ -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 - 06410 Biot Sophia Antipolis cedex, FRANCE
|
|
||||||
|
|
||||||
*******************************************************************************/
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
|
|
||||||
\file transact.c
|
|
||||||
|
|
||||||
\brief Gestion des transactions entre les différentes entités
|
|
||||||
|
|
||||||
\author BURLOT Pascal
|
|
||||||
|
|
||||||
\date 17/07/08
|
|
||||||
|
|
||||||
\par Historique:
|
|
||||||
$Author$ $Date$ $Revision$
|
|
||||||
$Id$
|
|
||||||
$Log$
|
|
||||||
|
|
||||||
*******************************************************************************
|
|
||||||
*/
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <errno.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <unistd.h>
|
|
||||||
|
|
||||||
#include "debug.h"
|
|
||||||
#include "L3_rrc_defs.h"
|
|
||||||
#include "rrm_util.h"
|
|
||||||
#include "transact.h"
|
|
||||||
|
|
||||||
|
|
||||||
//! Selection locale du mode de debug
|
|
||||||
#define DBG_TRANSACT 0
|
|
||||||
|
|
||||||
#if DBG_TRANSACT==0
|
|
||||||
//! Macro inactive
|
|
||||||
#define PRINT_TRANSACT(...)
|
|
||||||
#else
|
|
||||||
//! Macro affichant la liste de transaction
|
|
||||||
#define PRINT_TRANSACT(...) print_transact( __VA_ARGS__ )
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief La fonction affiche a l'ecran la liste (pour DEBUG )
|
|
||||||
|
|
||||||
\return aucune valeur retournee
|
|
||||||
*/
|
|
||||||
static void print_transact(
|
|
||||||
transact_t *pEntry ///< pointeur sur la liste de transaction
|
|
||||||
)
|
|
||||||
{
|
|
||||||
transact_t *pCurrentItem = pEntry;
|
|
||||||
|
|
||||||
fprintf(stderr,"transact_t=[\n");
|
|
||||||
|
|
||||||
while ( pCurrentItem != NULL) {
|
|
||||||
fprintf(stderr," @%p(.id=%u, .interf_id=%u, .funct_id=%u, .ttl=%u, .next=%p, .parent_id=%d, .parent_status=%d)\n",
|
|
||||||
pCurrentItem, pCurrentItem->id, pCurrentItem->interf_id,pCurrentItem->funct_id,
|
|
||||||
pCurrentItem->ttl, pCurrentItem->next, pCurrentItem->parent_id, pCurrentItem->parent_status);
|
|
||||||
|
|
||||||
pCurrentItem = pCurrentItem->next ;
|
|
||||||
}
|
|
||||||
|
|
||||||
fprintf(stderr," ]\n");
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief La fonction ajoute un element en debut de la liste des transactions
|
|
||||||
non-cloturees.
|
|
||||||
|
|
||||||
\return retourne le pointeur de debut de liste.
|
|
||||||
*/
|
|
||||||
transact_t *add_item_transact(
|
|
||||||
transact_t **pEntry , ///< pointeur sur l'entree sur la liste de transaction
|
|
||||||
Transaction_t id , ///< ID de la transaction
|
|
||||||
unsigned int interf_id, ///< Identification de l'interface de la transaction
|
|
||||||
unsigned int funct_id , ///< Identification de la function a l'origine de la transaction
|
|
||||||
unsigned int parent , ///< Transaction parent
|
|
||||||
unsigned int status ///< Status de la transaction
|
|
||||||
)
|
|
||||||
{
|
|
||||||
transact_t *pOldEntry = *pEntry;
|
|
||||||
|
|
||||||
transact_t *pNewItem = RRM_MALLOC(transact_t , 1 ) ;
|
|
||||||
|
|
||||||
PNULL(pNewItem) ;
|
|
||||||
|
|
||||||
if ( pNewItem == NULL )
|
|
||||||
return NULL ;
|
|
||||||
|
|
||||||
*pEntry = pNewItem ;
|
|
||||||
pNewItem->next = pOldEntry ;
|
|
||||||
pNewItem->id = id ;
|
|
||||||
pNewItem->interf_id = interf_id ;
|
|
||||||
pNewItem->funct_id = funct_id ;
|
|
||||||
pNewItem->parent_id = parent ;
|
|
||||||
pNewItem->parent_status = status ;
|
|
||||||
pNewItem->ttl = TTL_DEFAULT_VALUE ;
|
|
||||||
|
|
||||||
PRINT_TRANSACT( *pEntry );
|
|
||||||
return pNewItem ;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief La fonction retire un element de la liste des transactions non-cloturees.
|
|
||||||
|
|
||||||
\return aucune valeur.
|
|
||||||
*/
|
|
||||||
void del_item_transact(
|
|
||||||
transact_t **pEntry , ///< pointeur sur l'entree sur la liste de transaction
|
|
||||||
Transaction_t id ///< ID de la transaction a detruire
|
|
||||||
)
|
|
||||||
{
|
|
||||||
transact_t *pCurrentItem = *pEntry;
|
|
||||||
transact_t *pNextItem ;
|
|
||||||
transact_t **ppPrevItem = pEntry ;
|
|
||||||
|
|
||||||
if ( (pCurrentItem == NULL) || (pEntry==NULL))
|
|
||||||
return ;
|
|
||||||
|
|
||||||
while ( pCurrentItem != NULL ) {
|
|
||||||
pNextItem = pCurrentItem->next ;
|
|
||||||
|
|
||||||
if ( pCurrentItem->id == id ) {
|
|
||||||
*ppPrevItem = pNextItem;
|
|
||||||
RRM_FREE( pCurrentItem ) ;
|
|
||||||
break ;
|
|
||||||
}
|
|
||||||
|
|
||||||
ppPrevItem = &(pCurrentItem->next) ;
|
|
||||||
pCurrentItem = pNextItem ;
|
|
||||||
}
|
|
||||||
|
|
||||||
PRINT_TRANSACT( *pEntry );
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief La fonction recherche un element dans la liste des transactions
|
|
||||||
non-cloturees.
|
|
||||||
|
|
||||||
\return la valeur retournee est la transaction trouvee sinon NULL
|
|
||||||
*/
|
|
||||||
transact_t *get_item_transact(
|
|
||||||
transact_t *pEntry , ///< pointeur sur l'entree sur la liste de transaction
|
|
||||||
Transaction_t id ///< ID de la transaction a rechercher
|
|
||||||
)
|
|
||||||
{
|
|
||||||
transact_t *pCurrentItem = pEntry;
|
|
||||||
|
|
||||||
while ( (pCurrentItem != NULL) && ( pCurrentItem->id != id )) {
|
|
||||||
pCurrentItem = pCurrentItem->next ;
|
|
||||||
}
|
|
||||||
|
|
||||||
return pCurrentItem ;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief La fonction rearme la valeur du ttl de la transaction
|
|
||||||
|
|
||||||
\return aucune valeur retournee
|
|
||||||
*/
|
|
||||||
void set_ttl_transact(
|
|
||||||
transact_t *pEntry , ///< pointeur sur l'entree sur la liste de transaction
|
|
||||||
Transaction_t id , ///< ID de la transaction
|
|
||||||
unsigned int value ///< valeur du ttl
|
|
||||||
)
|
|
||||||
{
|
|
||||||
transact_t *transaction = get_item_transact( pEntry , id ) ;
|
|
||||||
|
|
||||||
if ( transaction != NULL )
|
|
||||||
transaction->ttl = value ;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief La fonction decremente les valeurs du ttl de toutes les transactions
|
|
||||||
|
|
||||||
\return aucune valeur retournee
|
|
||||||
*/
|
|
||||||
void dec_all_ttl_transact(
|
|
||||||
transact_t *pEntry ///< pointeur sur l'entree sur la liste de transaction
|
|
||||||
)
|
|
||||||
{
|
|
||||||
transact_t *pCurrentItem = pEntry;
|
|
||||||
|
|
||||||
while ( pCurrentItem != NULL) {
|
|
||||||
if (pCurrentItem->ttl !=0 )
|
|
||||||
pCurrentItem->ttl -=1 ;
|
|
||||||
|
|
||||||
pCurrentItem = pCurrentItem->next ;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
|
||||||
*******************************************************************************
|
|
||||||
\brief La fonction supprime les transactions dont le ttl est nulle
|
|
||||||
|
|
||||||
\return aucune valeur retournee
|
|
||||||
*/
|
|
||||||
void del_all_obseleted_transact(
|
|
||||||
transact_t **pEntry ///< pointeur sur l'entree sur la liste de transaction
|
|
||||||
)
|
|
||||||
{
|
|
||||||
transact_t *pCurrentItem = *pEntry;
|
|
||||||
transact_t *pNextItem ;
|
|
||||||
|
|
||||||
while ( pCurrentItem != NULL) {
|
|
||||||
pNextItem = pCurrentItem->next ;
|
|
||||||
|
|
||||||
if (pCurrentItem->ttl == 0 ) {
|
|
||||||
fprintf(stderr,"Delete obselete Transaction: \n" ) ;
|
|
||||||
print_transact(pCurrentItem) ;
|
|
||||||
del_item_transact( pEntry , pCurrentItem->id ) ;
|
|
||||||
}
|
|
||||||
|
|
||||||
pCurrentItem = pNextItem ;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user