Added a more flexible OPER command in the SVDRP interface.

This commit is contained in:
Rolf Ahrenberg 2015-04-09 21:36:13 +03:00
parent 7bdc152f76
commit fe010ab72c
6 changed files with 25 additions and 9 deletions

View File

@ -130,3 +130,8 @@ VDR Plugin 'satip' Revision History
(Thanks to Oliver Endriss).
- Updated against SAT>IP protocol specification
version 1.2.2.
2015-XX-XX: Version 2.2.2
- Added a more flexible OPER command in the SVDRP
interface.

View File

@ -5,7 +5,7 @@
#
msgid ""
msgstr ""
"Project-Id-Version: vdr-satip 2.2.1\n"
"Project-Id-Version: vdr-satip 2.2.2\n"
"Report-Msgid-Bugs-To: <see README>\n"
"POT-Creation-Date: 2015-04-04 04:04+0300\n"
"PO-Revision-Date: 2015-04-04 04:04+0300\n"

View File

@ -5,7 +5,7 @@
#
msgid ""
msgstr ""
"Project-Id-Version: vdr-satip 2.2.1\n"
"Project-Id-Version: vdr-satip 2.2.2\n"
"Report-Msgid-Bugs-To: <see README>\n"
"POT-Creation-Date: 2015-04-04 04:04+0300\n"
"PO-Revision-Date: 2015-04-04 04:04+0300\n"

View File

@ -5,7 +5,7 @@
#
msgid ""
msgstr ""
"Project-Id-Version: vdr-satip 2.2.1\n"
"Project-Id-Version: vdr-satip 2.2.2\n"
"Report-Msgid-Bugs-To: <see README>\n"
"POT-Creation-Date: 2015-04-04 04:04+0300\n"
"PO-Revision-Date: 2015-04-04 04:04+0300\n"

View File

@ -5,7 +5,7 @@
#
msgid ""
msgstr ""
"Project-Id-Version: vdr-satip 2.2.1\n"
"Project-Id-Version: vdr-satip 2.2.2\n"
"Report-Msgid-Bugs-To: <see README>\n"
"POT-Creation-Date: 2015-04-04 04:04+0300\n"
"PO-Revision-Date: 2015-04-04 04:04+0300\n"

21
satip.c
View File

@ -27,7 +27,7 @@
#define GITVERSION ""
#endif
const char VERSION[] = "2.2.1" GITVERSION;
const char VERSION[] = "2.2.2" GITVERSION;
static const char DESCRIPTION[] = trNOOP("SAT>IP Devices");
class cPluginSatip : public cPlugin {
@ -366,8 +366,8 @@ const char **cPluginSatip::SVDRPHelpPages(void)
" Lists status information of SAT>IP devices.\n",
"CONT\n"
" Shows SAT>IP device count.\n",
"OPER\n"
" Toggles operating mode of SAT>IP devices.\n",
"OPER [ off | low | normal | high ]\n"
" Gets and(or sets operating mode of SAT>IP devices.\n",
"TRAC [ <mode> ]\n"
" Gets and/or sets used tracing mode.\n",
NULL
@ -434,8 +434,19 @@ cString cPluginSatip::SVDRPCommand(const char *commandP, const char *optionP, in
}
else if (strcasecmp(commandP, "OPER") == 0) {
cString mode;
SatipConfig.ToggleOperatingMode();
switch (SatipConfig.GetOperatingMode()) {
unsigned int oper = SatipConfig.GetOperatingMode();
if (optionP && *optionP) {
if (strcasecmp(optionP, "off") == 0)
oper = cSatipConfig::eOperatingModeOff;
else if (strcasecmp(optionP, "low") == 0)
oper = cSatipConfig::eOperatingModeLow;
else if (strcasecmp(optionP, "normal") == 0)
oper = cSatipConfig::eOperatingModeNormal;
else if (strcasecmp(optionP, "high") == 0)
oper = cSatipConfig::eOperatingModeHigh;
SatipConfig.SetOperatingMode(oper);
}
switch (oper) {
case cSatipConfig::eOperatingModeOff:
mode = "off";
break;