mirror of
https://dev.iopsys.eu/bbf/bbfdm.git
synced 2026-02-19 18:51:58 +01:00
remove X_<VENDOR>_PowerManagement object
This commit is contained in:
parent
b02097d09a
commit
0693cef8d5
5 changed files with 0 additions and 127 deletions
|
|
@ -51,7 +51,6 @@ libbbfdm_la_SOURCES += \
|
|||
../dmtree/tr181/managementserver.c \
|
||||
../dmtree/tr181/times.c \
|
||||
../dmtree/tr181/upnp.c \
|
||||
../dmtree/tr181/x_iopsys_eu_power_mgmt.c \
|
||||
../dmtree/tr181/x_iopsys_eu_syslog.c \
|
||||
../dmtree/tr181/x_iopsys_eu_dropbear.c \
|
||||
../dmtree/tr181/x_iopsys_eu_owsd.c \
|
||||
|
|
|
|||
|
|
@ -14,7 +14,6 @@
|
|||
#include "managementserver.h"
|
||||
#include "times.h"
|
||||
#include "upnp.h"
|
||||
#include "x_iopsys_eu_power_mgmt.h"
|
||||
#include "x_iopsys_eu_syslog.h"
|
||||
#include "softwaremodules.h"
|
||||
#include "xmpp.h"
|
||||
|
|
@ -91,8 +90,6 @@ DMOBJ tRoot181ObjUPNPBBF[] = {
|
|||
#if BBF_TR104
|
||||
{"VoiceService", &DMREAD, NULL, NULL, NULL, browseVoiceServiceInst, NULL, NULL, tServicesVoiceServiceObj, tServicesVoiceServiceParams, NULL, BBFDM_BOTH},
|
||||
#endif
|
||||
{CUSTOM_PREFIX"MCPD", &DMREAD, NULL, NULL, NULL, NULL, NULL, &DMNONE,NULL, X_IOPSYS_EU_MCPDParams, NULL, BBFDM_BOTH},
|
||||
{CUSTOM_PREFIX"PowerManagement", &DMREAD, NULL, NULL, NULL, NULL, NULL, &DMNONE,NULL, tSe_PowerManagementParam, NULL, BBFDM_BOTH},
|
||||
{CUSTOM_PREFIX"Syslog", &DMREAD, NULL, NULL, NULL, NULL, NULL, &DMNONE,NULL, tSe_SyslogParam, NULL, BBFDM_BOTH},
|
||||
{"SoftwareModules", &DMREAD, NULL, NULL, NULL, NULL, NULL, &DMNONE,tSoftwareModulesObj, NULL, NULL, BBFDM_BOTH},
|
||||
{CUSTOM_PREFIX"OWSD", &DMREAD, NULL, NULL, NULL, NULL, NULL, &DMNONE,X_IOPSYS_EU_OWSDObj, X_IOPSYS_EU_OWSDParams, NULL, BBFDM_BOTH},
|
||||
|
|
@ -123,7 +120,6 @@ UPNP_SUPPORTED_DM tUPNPSupportedDM_181[] = {
|
|||
{"/BBF/Time/", DMROOT_URI_181, DMROOT_URL_181, "Time from "DMROOT_DESC_181, ""},
|
||||
{"/BBF/UPnP/", DMROOT_URI_181, DMROOT_URL_181, "UPnP from "DMROOT_DESC_181, ""},
|
||||
{"/BBF/VoiceService/", "urn:broadband-forum-org:wt-104-2-0-0", "https://www.broadband-forum.org/cwmp/tr-104-2-0-0.html", "TR-104 Voice:2 Service Object definition", ""},
|
||||
{"/BBF/"CUSTOM_PREFIX"PowerManagement/", "urn:iopsys-eu:na", "https://www.iopsys.eu/", "iopsys extension for PowerManagement", ""},
|
||||
{"/BBF/"CUSTOM_PREFIX"Syslog/", "urn:iopsys-eu:na", "https://www.iopsys.eu/", "iopsys extension for Syslog", ""},
|
||||
{"/BBF/SoftwareModules/", DMROOT_URI_181, DMROOT_URL_181, "SoftwareModules from "DMROOT_DESC_181, ""},
|
||||
{"/BBF/"CUSTOM_PREFIX"OWSD/", "urn:iopsys-eu:na", "https://www.iopsys.eu/", "iopsys extension for OWSD", ""},
|
||||
|
|
|
|||
|
|
@ -15,7 +15,6 @@
|
|||
#include "managementserver.h"
|
||||
#include "times.h"
|
||||
#include "upnp.h"
|
||||
#include "x_iopsys_eu_power_mgmt.h"
|
||||
#include "x_iopsys_eu_syslog.h"
|
||||
#include "xmpp.h"
|
||||
#include "x_iopsys_eu_owsd.h"
|
||||
|
|
@ -77,7 +76,6 @@ DMOBJ tRoot_181_Obj[] = {
|
|||
#ifdef BBF_TR104
|
||||
{"Services", &DMREAD, NULL, NULL, NULL, NULL, NULL, &DMNONE, NULL, tServicesObj, NULL, NULL, BBFDM_BOTH},
|
||||
#endif
|
||||
{CUSTOM_PREFIX"PowerManagement", &DMREAD, NULL, NULL, NULL, NULL, NULL, &DMNONE, NULL, NULL, tSe_PowerManagementParam, NULL, BBFDM_BOTH},
|
||||
{CUSTOM_PREFIX"Syslog", &DMREAD, NULL, NULL, NULL, NULL, NULL, &DMNONE, NULL, NULL, tSe_SyslogParam, NULL, BBFDM_BOTH},
|
||||
{CUSTOM_PREFIX"OWSD", &DMREAD, NULL, NULL, NULL, NULL, NULL, &DMNONE, NULL, X_IOPSYS_EU_OWSDObj, X_IOPSYS_EU_OWSDParams, NULL, BBFDM_BOTH},
|
||||
{CUSTOM_PREFIX"Dropbear", &DMWRITE, add_dropbear_instance, delete_dropbear_instance, NULL, browseXIopsysEuDropbear, NULL, &DMNONE, NULL, NULL, X_IOPSYS_EU_DropbearParams, NULL, BBFDM_BOTH},
|
||||
|
|
|
|||
|
|
@ -1,101 +0,0 @@
|
|||
/*
|
||||
* Copyright (C) 2019 iopsys Software Solutions AB
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License version 2.1
|
||||
* as published by the Free Software Foundation
|
||||
*
|
||||
* Author: Imen Bhiri <imen.bhiri@pivasoftware.com>
|
||||
* Author: Feten Besbes <feten.besbes@pivasoftware.com>
|
||||
* Author: Mohamed Kallel <mohamed.kallel@pivasoftware.com>
|
||||
* Author: Anis Ellouze <anis.ellouze@pivasoftware.com>
|
||||
*/
|
||||
|
||||
#include "x_iopsys_eu_power_mgmt.h"
|
||||
|
||||
|
||||
static int get_pwr_mgmt_value_ethapd(char *refparam, struct dmctx *ctx, void *data, char *instance, char **value)
|
||||
{
|
||||
dmuci_get_option_value_string("power_mgmt", "power_mgmt", "ethapd", value);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int get_pwr_mgmt_value_eee(char *refparam, struct dmctx *ctx, void *data, char *instance, char **value)
|
||||
{
|
||||
dmuci_get_option_value_string("power_mgmt", "power_mgmt", "eee", value);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int get_pwr_nbr_interfaces_up(char *refparam, struct dmctx *ctx, void *data, char *instance, char **value)
|
||||
{
|
||||
char buf[256];
|
||||
int pp;
|
||||
|
||||
*value = "";
|
||||
pp = dmcmd("pwrctl", 1, "show");
|
||||
if (pp) {
|
||||
dmcmd_read(pp, buf, 256);
|
||||
close(pp);
|
||||
return 0;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int get_pwr_nbr_interfaces_down(char *refparam, struct dmctx *ctx, void *data, char *instance, char **value)
|
||||
{
|
||||
char buf[256];
|
||||
int pp;
|
||||
|
||||
*value = "";
|
||||
pp = dmcmd("pwrctl", 1, "show");
|
||||
if (pp) {
|
||||
dmcmd_read(pp, buf, 256);
|
||||
close(pp);
|
||||
return 0;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int set_power_mgmt_param_ethapd(char *refparam, struct dmctx *ctx, void *data, char *instance, char *value, int action)
|
||||
{
|
||||
bool b;
|
||||
|
||||
switch (action) {
|
||||
case VALUECHECK:
|
||||
if (dm_validate_boolean(value))
|
||||
return FAULT_9007;
|
||||
return 0;
|
||||
case VALUESET:
|
||||
string_to_bool(value, &b);
|
||||
dmuci_set_value("power_mgmt", "power_mgmt", "ethapd", b ? "1" : "0");
|
||||
return 0;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int set_power_mgmt_param_eee(char *refparam, struct dmctx *ctx, void *data, char *instance, char *value, int action)
|
||||
{
|
||||
bool b;
|
||||
|
||||
switch (action) {
|
||||
case VALUECHECK:
|
||||
if (dm_validate_boolean(value))
|
||||
return FAULT_9007;
|
||||
return 0;
|
||||
case VALUESET:
|
||||
string_to_bool(value, &b);
|
||||
dmuci_set_value("power_mgmt", "power_mgmt", "eee", b ? "1" : "0");
|
||||
return 0;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*** DMROOT.X_IOPSYS_EU_PowerManagement. ***/
|
||||
DMLEAF tSe_PowerManagementParam[] = {
|
||||
/* PARAM, permission, type, getvalue, setvalue, forced_inform, notification, bbfdm_type*/
|
||||
{"EthernetAutoPowerDownEnable", &DMWRITE, DMT_BOOL, get_pwr_mgmt_value_ethapd, set_power_mgmt_param_ethapd, NULL, NULL, BBFDM_BOTH},
|
||||
{"EnergyEfficientEthernetEnable", &DMWRITE, DMT_BOOL, get_pwr_mgmt_value_eee, set_power_mgmt_param_eee, NULL, NULL, BBFDM_BOTH},
|
||||
{"NumberOfEthernetInterfacesPoweredUp", &DMREAD, DMT_UNINT, get_pwr_nbr_interfaces_up, NULL, NULL, NULL, BBFDM_BOTH},
|
||||
{"NumberOfEthernetInterfacesPoweredDown", &DMREAD, DMT_UNINT, get_pwr_nbr_interfaces_down, NULL, NULL, NULL, BBFDM_BOTH},
|
||||
{0}
|
||||
};
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
/*
|
||||
* Copyright (C) 2019 iopsys Software Solutions AB
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License version 2.1
|
||||
* as published by the Free Software Foundation
|
||||
*
|
||||
* Author: Imen Bhiri <imen.bhiri@pivasoftware.com>
|
||||
* Author: Feten Besbes <feten.besbes@pivasoftware.com>
|
||||
*/
|
||||
|
||||
#ifndef __POWER_MGMT_H
|
||||
#define __POWER_MGMT_H
|
||||
|
||||
#include <libbbf_api/dmcommon.h>
|
||||
|
||||
extern DMLEAF tSe_PowerManagementParam[];
|
||||
|
||||
#endif
|
||||
Loading…
Add table
Reference in a new issue