1
0
mirror of https://github.com/rofafor/vdr-plugin-satip.git synced 2023-10-10 13:37:42 +02:00

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). (Thanks to Oliver Endriss).
- Updated against SAT>IP protocol specification - Updated against SAT>IP protocol specification
version 1.2.2. 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 "" msgid ""
msgstr "" 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" "Report-Msgid-Bugs-To: <see README>\n"
"POT-Creation-Date: 2015-04-04 04:04+0300\n" "POT-Creation-Date: 2015-04-04 04:04+0300\n"
"PO-Revision-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 "" msgid ""
msgstr "" 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" "Report-Msgid-Bugs-To: <see README>\n"
"POT-Creation-Date: 2015-04-04 04:04+0300\n" "POT-Creation-Date: 2015-04-04 04:04+0300\n"
"PO-Revision-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 "" msgid ""
msgstr "" 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" "Report-Msgid-Bugs-To: <see README>\n"
"POT-Creation-Date: 2015-04-04 04:04+0300\n" "POT-Creation-Date: 2015-04-04 04:04+0300\n"
"PO-Revision-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 "" msgid ""
msgstr "" 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" "Report-Msgid-Bugs-To: <see README>\n"
"POT-Creation-Date: 2015-04-04 04:04+0300\n" "POT-Creation-Date: 2015-04-04 04:04+0300\n"
"PO-Revision-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 "" #define GITVERSION ""
#endif #endif
const char VERSION[] = "2.2.1" GITVERSION; const char VERSION[] = "2.2.2" GITVERSION;
static const char DESCRIPTION[] = trNOOP("SAT>IP Devices"); static const char DESCRIPTION[] = trNOOP("SAT>IP Devices");
class cPluginSatip : public cPlugin { class cPluginSatip : public cPlugin {
@ -366,8 +366,8 @@ const char **cPluginSatip::SVDRPHelpPages(void)
" Lists status information of SAT>IP devices.\n", " Lists status information of SAT>IP devices.\n",
"CONT\n" "CONT\n"
" Shows SAT>IP device count.\n", " Shows SAT>IP device count.\n",
"OPER\n" "OPER [ off | low | normal | high ]\n"
" Toggles operating mode of SAT>IP devices.\n", " Gets and(or sets operating mode of SAT>IP devices.\n",
"TRAC [ <mode> ]\n" "TRAC [ <mode> ]\n"
" Gets and/or sets used tracing mode.\n", " Gets and/or sets used tracing mode.\n",
NULL NULL
@ -434,8 +434,19 @@ cString cPluginSatip::SVDRPCommand(const char *commandP, const char *optionP, in
} }
else if (strcasecmp(commandP, "OPER") == 0) { else if (strcasecmp(commandP, "OPER") == 0) {
cString mode; cString mode;
SatipConfig.ToggleOperatingMode(); unsigned int oper = SatipConfig.GetOperatingMode();
switch (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: case cSatipConfig::eOperatingModeOff:
mode = "off"; mode = "off";
break; break;