vty: Add a file for C++ functions
Currently the pcu_vty.c doesn't compile with C++. Thus C++ object cannot be access directly there. This commit adds a helper C++ file that exports all functions with C calling conventions and naming to work around that limitation until the transition of pcu_vty.c is completed. Sponsored-by: On-Waves ehf
This commit is contained in:
parent
a700dd9e11
commit
62e96a3535
|
@ -43,6 +43,7 @@ libgprs_la_SOURCES = \
|
||||||
bitvector.cpp \
|
bitvector.cpp \
|
||||||
pcu_l1_if.cpp \
|
pcu_l1_if.cpp \
|
||||||
pcu_vty.c \
|
pcu_vty.c \
|
||||||
|
pcu_vty_functions.cpp \
|
||||||
tbf.cpp \
|
tbf.cpp \
|
||||||
tbf_ul.cpp \
|
tbf_ul.cpp \
|
||||||
tbf_dl.cpp \
|
tbf_dl.cpp \
|
||||||
|
@ -85,6 +86,7 @@ noinst_HEADERS = \
|
||||||
gsm_timer.h \
|
gsm_timer.h \
|
||||||
bitvector.h \
|
bitvector.h \
|
||||||
pcu_vty.h \
|
pcu_vty.h \
|
||||||
|
pcu_vty_functions.h \
|
||||||
sysmo_l1_if.h \
|
sysmo_l1_if.h \
|
||||||
femtobts.h \
|
femtobts.h \
|
||||||
tbf.h \
|
tbf.h \
|
||||||
|
|
|
@ -12,6 +12,8 @@
|
||||||
#include "bts.h"
|
#include "bts.h"
|
||||||
#include "tbf.h"
|
#include "tbf.h"
|
||||||
|
|
||||||
|
#include "pcu_vty_functions.h"
|
||||||
|
|
||||||
enum node_type pcu_vty_go_parent(struct vty *vty)
|
enum node_type pcu_vty_go_parent(struct vty *vty)
|
||||||
{
|
{
|
||||||
switch (vty->node) {
|
switch (vty->node) {
|
||||||
|
@ -96,7 +98,7 @@ static int config_write_pcu(struct vty *vty)
|
||||||
vty_out(vty, " dl-tbf-idle-time %d%s", bts->dl_tbf_idle_msec,
|
vty_out(vty, " dl-tbf-idle-time %d%s", bts->dl_tbf_idle_msec,
|
||||||
VTY_NEWLINE);
|
VTY_NEWLINE);
|
||||||
|
|
||||||
return CMD_SUCCESS;
|
return pcu_vty_config_write_pcu_ext(vty);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* per-BTS configuration */
|
/* per-BTS configuration */
|
||||||
|
|
|
@ -0,0 +1,36 @@
|
||||||
|
/* pcu_vty_functions.cpp
|
||||||
|
*
|
||||||
|
* Copyright (C) 2015 by Sysmocom s.f.m.c. GmbH
|
||||||
|
* Author: Jacob Erlbeck <jerlbeck@sysmocom.de>
|
||||||
|
*
|
||||||
|
* 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
*/
|
||||||
|
/* OsmoBTS VTY interface */
|
||||||
|
|
||||||
|
|
||||||
|
#include <stdint.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include "pcu_vty_functions.h"
|
||||||
|
|
||||||
|
extern "C" {
|
||||||
|
# include <osmocom/vty/command.h>
|
||||||
|
# include <osmocom/vty/logging.h>
|
||||||
|
# include <osmocom/vty/misc.h>
|
||||||
|
}
|
||||||
|
|
||||||
|
int pcu_vty_config_write_pcu_ext(struct vty *vty)
|
||||||
|
{
|
||||||
|
return CMD_SUCCESS;
|
||||||
|
}
|
|
@ -0,0 +1,33 @@
|
||||||
|
/* pcu_vty_functions.h
|
||||||
|
*
|
||||||
|
* Copyright (C) 2015 by Sysmocom s.f.m.c. GmbH
|
||||||
|
* Author: Jacob Erlbeck <jerlbeck@sysmocom.de>
|
||||||
|
*
|
||||||
|
* 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
struct vty;
|
||||||
|
|
||||||
|
int pcu_vty_config_write_pcu_ext(struct vty *vty);
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
Loading…
Reference in New Issue